Hidden
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
Hidden (SGR 8) is an SGR attribute that makes text invisible by rendering it in the same color as the background.
Syntax
CSI 8 m SGR 8 — Hidden (concealed)
CSI 28 m SGR 28 — Not hidden (revealed)
Formal syntax
SGR-hidden = 0x1b, "[", "8", "m" ; SGR-visible = 0x1b, "[", "28", "m" ;
Description
Per ECMA-48 §8.3.117, SGR parameter 8 selects "concealed characters." The text is still present in the terminal buffer and can be selected/copied, but it is not visually displayed.
Hidden is reset by SGR 28 or SGR 0.
The typical implementation renders the text with the foreground color set to the background color, making it invisible. Some terminals may implement this differently or not support it at all.
note
Hidden text is not a security feature — the text remains in the terminal buffer and is typically accessible via copy/paste or screen scraping.
Examples
printf '\e[8mHidden text\e[28m Visible text\n'
Specifications
| Specification | Section |
|---|---|
| VT510 Reference | — |
Terminal support
| Terminal | Support | Version | Notes |
|---|---|---|---|
| Terminal Emulators | |||
| Alacritty | ✓ | Yes | |
| Bobcat | ? | ? | Implemented in external TerminalCtrl library, not in Bobcat source code |
| contour | ✓ | v0.1.0 | |
| foot | ✓ | Yes | Implemented as 'conceal' at csi.c:128 |
| Ghostty | ✓ | v1.0.0 | |
| iTerm2 | ✓ | Yes | Hidden/invisible text (SGR 8) fully supported via VT100CHARATTR_INVISIBLE in VT100GraphicRendition structure. |
| Kitty | ✗ | No | SGR 8 not implemented |
| Konsole | ✓ | Yes | SGR 8 sets RE_CONCEAL rendition flag |
| mintty | ✓ | Yes | Implemented at src/termout.c:2149. Sets ATTR_INVISIBLE flag. |
| mlterm | ✓ | rel-3_8_2 | |
| PuTTY | ✗ | No | SGR 8 recognized in comments but not implemented (terminal.c:4618-4619) |
| Rio | ✓ | v0.0.3 | |
| rxvt-unicode | ✗ | No | Code comment says '// invisible. NYI' (Not Yet Implemented) |
| st | ✓ | 0.6 | Implemented as ATTR_INVISIBLE |
| terminology | ✓ | v0.1.0 | Stored as invisible attribute |
| VT100 | ✗ | No | |
| VTE | ✓ | Yes | |
| WezTerm | ✓ | Yes | |
| Windows Terminal | ✓ | Yes | SGR 8 sets invisible attribute |
| xterm | ✓ | Yes | ECMA-48 2nd/VT300 feature |
| xterm.js | ✓ | 2.3.0 | |
| Multiplexers | |||
| cy | ✗ | No | |
| GNU Screen | ✗ | No | SGR 8 not supported (rendlist[8] = 0 at src/ansi.c:1703) |
| tmux | ✓ | 0.8 | |
| tuios | ✓ | v0.0.15 | |
| Zellij | ✓ | v0.12.0 | |
See also
- Reverse video — SGR 7 — Swap foreground/background