SGR 53 — Overlined
Render text with a line drawn ABOVE the glyphs — mirror of underline. Disable with SGR 55.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\x1b[53m\033[53m\e[53mESC [ 53 m1b 5b 35 33 6dLive preview
Rendered in your browser via the same tokeniser the decoder uses — no terminal needed.
Description
ECMA-48 §8.3.117 defines SGR 53 as OVERLINED — a horizontal line drawn along the top of the glyph row, the visual mirror of underline (SGR 4). Byte sequence \x1b[53m. Disable with SGR 55 (\x1b[55m) — the matching close in the same way SGR 24 closes underline and SGR 29 closes strikethrough. The visual is rendered as a thin line above the cap-height for most fonts, though some emulators draw it slightly thicker or at a small offset to leave room for diacritics. The spec assigns SGR 53 / 55 to the same emphasis family as underline and strikethrough — three roughly parallel "draw a horizontal line on the glyph" attributes.
Adoption is uneven and the most pronounced split of any modern SGR. The supporting set: kitty, wezterm, contour, ghostty, foot, recent versions of iTerm2 and Konsole all render SGR 53. The non-supporting set: xterm, alacritty, Windows Terminal, gnome-terminal, Linux console, and Apple Terminal.app do *not* — they parse and silently swallow SGR 53 / 55 (no error, no visual). terminfo doesn't define a capability for overline at all — even on terminals that support it, tput has no portable spelling, so apps must emit the bytes directly. tmux 3.0+ forwards SGR 53 only with explicit terminal-features '*:overline' configuration; older tmux versions strip it. The split-support reality means SGR 53 emission on an unsupported terminal yields zero visual signal — silently broken UX, and an unprepared author will swear it worked "everywhere I tested" because they tested on kitty.
The defensive pattern is to pair SGR 53 with a fallback that survives the unsupported terminals. The most common: also emit a Unicode combining overline (U+0305, COMBINING OVERLINE) on each character — terminals that render SGR 53 will show both (a harmless redundant overline), terminals that ignore SGR 53 will still show the per-glyph combining overline. Alternative fallbacks: bracket the text with U+203E OVERLINE characters as a typographic prefix / suffix, or detect terminal capability at startup and skip the overline emphasis entirely when the runtime terminal isn't in the supporting matrix. Common practical uses where the fallback is essential: NATO message overlining convention, log-severity markers (overline ALERT lines), distinguishing struck-through-but-different content, accentuating shortcut keys in help text. The color-only-signal accessibility pitfall applies — screen readers ignore overline entirely, so it must never be the sole semantic marker; pair with a textual label. Related: sgr-underline (SGR 4 / 24 — the underline mirror that overline complements visually), sgr-strikethrough (SGR 9 / 29 — the other "draw a horizontal line" emphasis with similarly uneven adoption across the matrix), sgr-reset (SGR 0 — also clears overline among everything else).
Spec citation: ECMA-48 §8.3.117 (SGR parameter 53)
Examples
printf '\033[53moverlined\033[55m back\033[0m\n'print('\x1b[53moverlined\x1b[0m')fmt.Print("\x1b[53moverlined\x1b[0m")console.log('\x1b[53moverlined\x1b[0m')printf("\x1b[53moverlined\x1b[0m\n");Terminal support
- xterm
- no
- Linux console (fbcon)
- no
- macOS Terminal.app
- no
- iTerm2
- partial
- Windows Terminal
- no
- cmd.exe / ConPTY
- no
- kitty
- yes
- alacritty
- no
- WezTerm
- yes
- Ghostty
- yes
- GNOME Terminal
- no
- Konsole
- partial
- tmux
- yes
- GNU screen
- yes
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| no | no | no | partial | no | no | yes | no | yes | yes | no | partial | yes | yes |