Skip to main content

Strikethrough

AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Standard

Strikethrough (SGR 9) is an SGR attribute that renders text with a horizontal line through the middle.

Syntax​

CSI 9 m     SGR 9 — Strikethrough (crossed out)
CSI 29 m SGR 29 — Not strikethrough
Formal syntax
SGR-strikethrough     = 0x1b, "[", "9", "m" ;
SGR-not-strikethrough = 0x1b, "[", "29", "m" ;

Description​

Per ECMA-48 §8.3.117, SGR parameter 9 selects "crossed-out (characters still legible but marked as to be deleted)." A horizontal line is drawn through the center of each character.

Strikethrough is reset by SGR 29 or SGR 0.

Strikethrough was not supported on DEC VT terminals. It is widely supported by modern terminal emulators.

Examples​

printf '\e[9mStrikethrough text\e[29m Normal text\n'
printf '\e[9;31mRed strikethrough\e[0m\n'

Specifications​

SpecificationSection
VT510 Reference—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✓Yes
Bobcat??Implemented in external TerminalCtrl library, not in Bobcat source code
contour✓v0.1.0
foot✓YesImplemented at csi.c:129
Ghostty✓v1.0.0
iTerm2✓YesStrikethrough (SGR 9) fully supported via VT100CHARATTR_STRIKETHROUGH in VT100GraphicRendition structure.
Kitty✓Yes
Konsole✓YesSGR 9 sets RE_STRIKEOUT rendition flag
mintty✓YesImplemented at src/termout.c:2156. Sets ATTR_STRIKEOUT flag.
mlterm✓rel-3_3_7
PuTTY✓0.75SGR 9 sets ATTR_STRIKE at terminal.c:4669-4671
Rio✓v0.0.3
rxvt-unicode✗NoCommented out in code with '//case 9: // crossed out'
st✓0.6Implemented as ATTR_STRUCK
terminology✓v0.1.0Stored as strike attribute
VT100✗No
VTE✓Yes
WezTerm✓Yes
Windows Terminal✓YesSGR 9 sets crossed-out attribute
xterm✓YesECMA-48 3rd edition feature, requires OPT_WIDE_ATTRS
xterm.js✓4.14.0
Multiplexers
cy✓v0.6.0
GNU Screen✗NoSGR 9 not supported (rendlist[9] = 0 at src/ansi.c:1703)
tmux✓2.4
tuios✓v0.0.15
Zellij✓v0.12.0

See also​