SGR 9 — Strikethrough
Render following text with a horizontal line through it.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\\x1b[
\x1b[9m\\033[
\033[9m\\e[
\e[9mESC [
ESC [ 9 mhex
1b 5b 39 6dDescription
ECMA-48 calls this 'crossed-out'. Disable with `\x1b[29m`. Supported by most modern emulators (xterm, iTerm2, kitty, alacritty, wezterm, Windows Terminal, gnome-terminal, konsole, Ghostty). Linux console and traditional cmd.exe ignore it. Commonly used to mark deleted lines in diff renderers and crossed-out items in TODO/CLI lists.
Spec citation: ECMA-48 §8.3.117 (SGR parameter 9)
Examples
printf '\033[9mdeleted line\033[29m\n'print('\x1b[9mdeleted\x1b[0m')fmt.Print("\x1b[9mdeleted\x1b[0m")console.log('\x1b[9mdeleted\x1b[0m')printf("\x1b[9mdeleted\x1b[0m\n");Terminal support
- xterm
- yes
- Linux console (fbcon)
- no
- macOS Terminal.app
- yes
- iTerm2
- yes
- Windows Terminal
- yes
- cmd.exe / ConPTY
- no
- kitty
- yes
- alacritty
- yes
- WezTerm
- yes
- Ghostty
- yes
- GNOME Terminal
- yes
- Konsole
- yes
- tmux
- no
- GNU screen
- no
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| yes | no | yes | yes | yes | no | yes | yes | yes | yes | yes | yes | no | no |