Skip to main content

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​

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 as 'conceal' at csi.c:128
Ghostty✓v1.0.0
iTerm2✓YesHidden/invisible text (SGR 8) fully supported via VT100CHARATTR_INVISIBLE in VT100GraphicRendition structure.
Kitty✗NoSGR 8 not implemented
Konsole✓YesSGR 8 sets RE_CONCEAL rendition flag
mintty✓YesImplemented at src/termout.c:2149. Sets ATTR_INVISIBLE flag.
mlterm✓rel-3_8_2
PuTTY✗NoSGR 8 recognized in comments but not implemented (terminal.c:4618-4619)
Rio✓v0.0.3
rxvt-unicode✗NoCode comment says '// invisible. NYI' (Not Yet Implemented)
st✓0.6Implemented as ATTR_INVISIBLE
terminology✓v0.1.0Stored as invisible attribute
VT100✗No
VTE✓Yes
WezTerm✓Yes
Windows Terminal✓YesSGR 8 sets invisible attribute
xterm✓YesECMA-48 2nd/VT300 feature
xterm.js✓2.3.0
Multiplexers
cy✗No
GNU Screen✗NoSGR 8 not supported (rendlist[8] = 0 at src/ansi.c:1703)
tmux✓0.8
tuios✓v0.0.15
Zellij✓v0.12.0

See also​