SGR 8 — Conceal / Hidden
Render following text invisibly (cursor still advances).
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\\x1b[
\x1b[8m\\033[
\033[8m\\e[
\e[8mESC [
ESC [ 8 mhex
1b 5b 38 6dDescription
Sets the foreground to be visually identical to the background — the text still occupies cells and is preserved by `select-all`/copy. Useful for spoiler tags or password-style display, but NOT a security primitive: the text is copyable. Disable with `\x1b[28m`. Most modern terminals honor it; Linux console and ConPTY treat it as a no-op.
Spec citation: ECMA-48 §8.3.117 (SGR parameter 8)
Examples
printf 'password: \033[8mhunter2\033[28m (select to reveal)\033[0m\n'print('\x1b[8mhidden\x1b[0m')fmt.Print("\x1b[8mhidden\x1b[0m")console.log('\x1b[8mhidden\x1b[0m')printf("\x1b[8mhidden\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 |