Skip to main content
ansicode
Terminal

Windows Terminal — ANSI escape code support

Windows Terminal is Microsoft's modern open-source terminal application, first released in 2019 (1.0 in May 2020). It replaces the legacy conhost.exe rendering layer and parses VT escape sequences directly — `\x1b[31m` no longer needs SetConsoleTextAttribute. Under the hood it talks to processes through ConPTY, the in-kernel pseudo-console layer that translates between modern VT bytes and the legacy Win32 console API for older `cmd.exe` callers.

For practical purposes: on Windows 10 1809+ and Windows 11, you can write the same xterm-ctlseqs your Linux scripts use, and Windows Terminal will render them. The few gaps (kitty graphics, sixel until 1.22) are documented below.

Last updated

Feature support

How this terminal scores against the 15 features tracked in the site-wide support matrix. Click any feature name to see the full row across every terminal.

  • 8 basic colors (30–37 / 40–47)SGR 30–37 foreground, 40–47 background.
    yes
  • Bright (aixterm) colors (90–97 / 100–107)aixterm SGR extension.
    yes
  • 256-color palette (38;5;n / 48;5;n)xterm 256-color extension.
    yes
  • 24-bit truecolor (38;2;r;g;b)16.7M direct RGB. Set $COLORTERM=truecolor.
    yes
  • Italic (SGR 3)Italic text attribute.
    yes
  • Styled underlines (4:1–4:5)Curly/dotted/dashed underline styles.
    yes
  • Strikethrough (SGR 9)Horizontal line through text.
    yes
  • OSC 8 hyperlinksInline clickable URIs.
    yes
  • Alt screen (?1049h)Full-screen app buffer.
    yes
  • Mouse tracking (SGR ?1006)Mouse click/drag events.
    yes
  • Bracketed paste (?2004)Pasted text wrapped in ESC[200~/ESC[201~.
    yes
  • Focus events (?1004)ESC[I on focus in, ESC[O on focus out.
    yes
  • Sixel graphicsDEC sixel inline raster images.
    yes
  • Kitty graphics protocolPNG/RGB inline images, animations.
    no
  • Synchronized output (?2026)Atomic frame updates to avoid tearing.
    yes

Sequences that work here

Canonical reference pages for the escape sequences this terminal handles cleanly. Each links to a full page with byte forms, citations, and per-language examples.

Quirks & version notes

Per-terminal caveats you'll want to know before relying on a sequence in production.

ConPTY rewrites legacy console API to VT
When a legacy app calls SetConsoleTextAttribute or WriteConsoleW with Windows colour attributes, ConPTY translates the call into the equivalent SGR bytes before they reach Windows Terminal's parser. The terminal itself only ever sees VT. The translation is lossy in two known directions: ConPTY collapses sub-cell cursor movement and discards mouse-mode bytes the legacy app didn't expect.
Sixel landed in 1.22 (preview), opt-in via setting
Windows Terminal Preview 1.22 (2024) shipped Sixel rendering. Enable via Settings → Profile → Advanced → "Enable Sixel graphics" or set `"experimental.sixelSupport": true` in profiles.json. Until 1.22 hits stable, the recommended detection path is DA1 (`CSI c`) — Windows Terminal advertises `4` only when the flag is on.
Kitty graphics: not supported, proposal #16264
The kitty `_G` APC graphics protocol is not implemented. The team's stance per issue microsoft/terminal#16264 is that they will not commit until the kitty spec stabilizes to v0.20+ and stops adding undocumented chunks. For cross-terminal image use, fall back to Sixel on 1.22+.
Default $TERM is xterm-256color
Windows Terminal sets `$TERM=xterm-256color` for WSL and SSH sessions, which doesn't advertise the Smulx (styled-underline) or Setrgbf/Setrgbb (truecolor terminfo) capabilities even though Windows Terminal itself supports them. Set `$TERM=xterm-direct` after the shell starts if you want apps to feature-detect via terminfo (`tput colors`) rather than environment heuristics.

Citations

Other terminals with landing pages