Skip to main content
ansicode

SGR 1 — Bold / Increased intensity

Render following text in bold (or bright on some terminals).

Byte forms

Every common string-literal form so you can paste-and-search either direction.

\\x1b[\x1b[1m
\\033[\033[1m
\\e[\e[1m
ESC [ESC [ 1 m
hex1b 5b 31 6d

Description

Turns on bold weight on most modern terminals. On older terminals and some retro emulators (Linux console with VGA fonts) this instead brightens the foreground color (mapping color N to color N+8). To turn bold OFF without clearing other attributes, emit `\x1b[22m` (SGR 22, normal intensity).

Spec citation: ECMA-48 §8.3.117 (SGR parameter 1)

Examples

bash
printf '\033[1mbold\033[22m normal\033[0m\n'
python
print('\x1b[1mbold\x1b[0m')
go
fmt.Print("\x1b[1mbold\x1b[0m")
javascript
console.log('\x1b[1mbold\x1b[0m')
c
printf("\x1b[1mbold\x1b[0m\n");

Terminal support

xterm
yes
Linux console (fbcon)
partial
macOS Terminal.app
yes
iTerm2
yes
Windows Terminal
yes
cmd.exe / ConPTY
partial
kitty
yes
alacritty
yes
WezTerm
yes
Ghostty
yes
GNOME Terminal
yes
Konsole
yes
tmux
no
GNU screen
no

Related sequences