Skip to content

Double underline (SGR 21) โ€‹

Category: sgr ยท Tags: ECMA-48 Standard ยท Specification โ†—

ESC [ 21 m
SGR 21 draws a double underline beneath text. The sequence is ESC [ 21 m. Also accessible via the Kitty sub-parameter syntax as ESC [ 4:2 m. Reset with SGR 24. Support varies โ€” some older terminals treat SGR 21 as bold-off rather than double underline.
How this is tested: Send \x1b[21mX, verify underline === "double". Tests whether SGR 21 is interpreted as double underline rather than bold-off.
Analysis2026-03-26

Supported by all 8 tested terminals โ€” universal adoption. Part of the Modern TUI baseline.

Supported by 11 of 13 backends (85%)

Terminal Applications โ€‹

TerminalVersionSupportNotes
iTerm23.6.9โœ“ yes
Ghostty1.3.1โœ“ yes
VS Code1.112.0โœ“ yes
Warp0.2026.03.18.08.24.03โœ“ yes
Cursor2.6.21โœ“ yes
tmux3.6aโœ“ yes
Kitty0.46.2โœ“ yes
Terminal.app2.15โœ“ yes
GNU Screen5.0.1โœ“ yes

Headless Backends โ€‹

Parser correctness only โ€” a โœ“ means the parser accepts the sequence.

BackendVersionSupportNotes
vterm0.2.0โœ“ yes
WezTerm0.1.0-fork.5โœ“ yes
Alacritty0.26.0~ partialAlacritty supports double underline in app but not in headless mode
vt1000.2.1โœ— noNot in VT100/VT220 โ€” only single underline supported

Powered by Termless
Playwright for Terminals