Skip to content

xterm.js

Headless Backend

@xterm/headless — JS-only, no DOM rendering.

xterm.js is the most widely deployed terminal emulator in the world. It powers the integrated terminal in VS Code, Cursor, and thousands of web-based terminals, cloud IDEs, and development tools. If you've used a terminal in a browser, you've almost certainly used xterm.js.

Originally a port of the xterm X11 terminal to JavaScript, xterm.js has evolved into a mature, GPU-accelerated terminal renderer with Canvas and WebGL backends. It supports truecolor, Unicode, mouse tracking, bracketed paste, and link detection.

VS Code pioneered shell integration via the OSC 633 protocol using xterm.js, enabling command decorations, run-recent-command, and sticky scroll. The xterm.js headless package (@xterm/headless) provides the parser without rendering — used by Termless as a backend.

Backend: @xterm/headless — JS-only, no DOM rendering. (js) · v5.5.0

⚠ Headless mode doesn't expose cursor visibility or underline variants

66%
154 passed · 15 partial · 64 failed of 233 features
Tested: April 10, 2026
Analysis2026-04-06

xterm.js scores 78% (177/227) on the terminfo.dev feature matrix, with gaps in the Core TUI, Modern TUI, Rich TUI, Unicode baselines. Ranks #11 of 12 tested terminals. Missing 50 features.

Version History

VersionSupportScoreFeatures
6.1.0-beta.195
77%113 / 147
6.0.0
76%112 / 147
5.5.0
66%154 / 233
5.4.0
76%112 / 147

Character Sets

FeatureSupportNotes
DEC line drawing character set✓ yes
DEC Special Graphics✓ yes
G0/G1 character set switching✓ yes
UTF-8 mode✓ yes

Cursor

FeatureSupportNotes
ANSI restore cursor (CSI u)✓ yes
ANSI save cursor (CSI s)✓ yes
CPL cursor preceding line (CSI F)✓ yes
CUD stops at bottom✓ yes
CUP at screen boundaries✓ yes
CUP with DECOM✓ yes
CUU stops at top✓ yes
Hide cursor (DECTCEM)~ partialParser handles DECTCEM but headless mode doesn't expose visibility state
Cursor horizontal absolute (CHA)✓ yes
HPA horizontal position absolute (CSI `)✓ yes
Cursor position (CUP)✓ yes
Cursor back (CUB)✓ yes
Cursor down (CUD)✓ yes
Cursor forward (CUF)✓ yes
Cursor home✓ yes
Cursor up (CUU)✓ yes
Cursor next line (CNL)✓ yes
Cursor position report (DSR 6)~ partialHeadless mode has no output stream for DSR responses
Reverse Wrap (Mode 45)✓ yes
Save/restore cursor (DECSC)✓ yes
Cursor shape (DECSCUSR)~ partialParser handles DECSCUSR but headless mode doesn't expose cursor shape
VPA vertical position absolute (CSI d)✓ yes

Device Status

FeatureSupportNotes
Mode Report (DECRPM)✓ yes
Request Setting (DECRQSS)✓ yes
DSR ?996 — color scheme query? unknown
COLORTERM env variable? unknown
KITTY_* env variables? unknown
LC_TERMINAL env variable? unknown
NO_COLOR env variable? unknown
TERM env variable? unknown
TERM_PROGRAM env variable? unknown
VTE_VERSION env variable? unknown
WEZTERM_* env variables? unknown
WT_SESSION env variable? unknown
Primary device attributes (DA1)~ partialHeadless mode has no output stream for DA1 responses
Secondary Device Attributes (DA2)✓ yes
Device status report (DSR 5)~ partialHeadless mode has no output stream for DSR responses
Feature Reporting (TERM_FEATURES)? unknown
Tertiary Device Attributes (DA3)✗ noDA3 not implemented in xterm.js
Query Terminfo (XTGETTCAP)✗ noXTGETTCAP not implemented in xterm.js
XTGETXRES — query resource value (DCS + Q)✓ yes
XTREPORTCOLORS — report color capabilities (CSI # R)✓ yes
Terminal Version (XTVERSION)✗ noXTVERSION not implemented in xterm.js
Report window size in pixels (CSI 14 t)~ partialWindow operations require real window system; not exposed in headless mode
Report cell size in pixels (CSI 16 t)~ partialWindow operations require real window system; not exposed in headless mode
Report text area size in chars (CSI 18 t)~ partialText area size report not exposed in xterm.js headless mode
Report icon label (CSI 20 t)~ partialIcon label report not exposed in xterm.js headless mode
Report window title (CSI 21 t)~ partialWindow title report not exposed in xterm.js headless mode
Push title/icon stack (CSI 22 ; 0 t)✓ yes
Pop title/icon stack (CSI 23 ; 0 t)✓ yes

Editing

FeatureSupportNotes
DECCARA — change attrs in rectangle✗ noVT420 rectangular area operations not implemented — legacy DEC features omitted by most modern terminals
DECCRA — copy rectangular area✗ noVT420 rectangular area operations not implemented — legacy DEC features omitted by most modern terminals
DECDC — delete columns (CSI Ps ' ~)✗ noColumn editing (SL/SR/DECIC/DECDC) not implemented — rarely needed by modern TUI apps
DECERA — erase rectangular area✗ noVT420 rectangular area operations not implemented — legacy DEC features omitted by most modern terminals
DECFRA — fill rectangular area✗ noVT420 rectangular area operations not implemented — legacy DEC features omitted by most modern terminals
DECIC — insert columns (CSI Ps ' })✗ noColumn editing (SL/SR/DECIC/DECDC) not implemented — rarely needed by modern TUI apps
DECRARA — reverse attrs in rectangle✗ noVT420 rectangular area operations not implemented — legacy DEC features omitted by most modern terminals
DECRQCRA — checksum rectangular area✗ noVT420 rectangular area operations not implemented — legacy DEC features omitted by most modern terminals
DECSACE — select attribute-change extent✓ yes
DECSERA — selective erase rectangular area✗ noVT420 rectangular area operations not implemented — legacy DEC features omitted by most modern terminals
Delete characters (DCH)✓ yes
Delete lines (DL)✓ yes
Insert characters (ICH)✓ yes
Insert lines (IL)✓ yes
Repeat character (REP)✓ yes
SL — shift left (CSI Ps SP @)✗ noColumn editing (SL/SR/DECIC/DECDC) not implemented — rarely needed by modern TUI apps
SR — shift right (CSI Ps SP A)✗ noColumn editing (SL/SR/DECIC/DECDC) not implemented — rarely needed by modern TUI apps

Extensions

FeatureSupportNotes
System clipboard paste? unknown
Font ligatures? unknown
iTerm2 Inline Images (OSC 1337)✗ noiTerm2 inline images not implemented in xterm.js
Kitty graphics protocol✗ noNot implemented in xterm.js
Kitty graphics: animation✗ noKitty graphics protocol not implemented in xterm.js
Kitty graphics: display✗ noKitty graphics protocol not implemented in xterm.js
Kitty graphics: transmit✗ noKitty graphics protocol not implemented in xterm.js
Kitty graphics: Unicode placeholders✗ noKitty graphics protocol not implemented in xterm.js
Kitty keyboard protocol✗ noNot implemented in xterm.js
Kitty keyboard: DISAMBIGUATE (flag 1)✗ noKitty keyboard protocol not implemented in xterm.js
Kitty keyboard: REPORT_ALL_KEYS (flag 8)✗ noKitty keyboard protocol not implemented in xterm.js
Kitty keyboard: REPORT_ALTERNATE (flag 4)✗ noKitty keyboard protocol not implemented in xterm.js
Kitty keyboard: REPORT_EVENTS (flag 2)✗ noKitty keyboard protocol not implemented in xterm.js
Kitty keyboard: REPORT_TEXT (flag 16)✗ noKitty keyboard protocol not implemented in xterm.js
Desktop Notifications (OSC 9/777)✗ noOSC 9 notifications not implemented in xterm.js
VS Code Shell Integration (OSC 633)✗ noVS Code shell integration (OSC 633) not supported
Icon and title (OSC 0)✓ yes
Icon name (OSC 1)✓ yes
Foreground color query (OSC 10)✗ noOSC 10 foreground color query not implemented in xterm.js
Reset color palette (OSC 104)✗ noOSC 104 color reset requires a real display — headless backends have no color palette to reset
Background color query (OSC 11)✗ noOSC 11 background color query not implemented in xterm.js
Reset foreground color (OSC 110)✗ noOSC 110 foreground reset requires a real display — headless backends have no color palette to reset
Reset background color (OSC 111)✗ noOSC 111 background reset requires a real display — headless backends have no color palette to reset
Reset cursor color (OSC 112)✗ noOSC 112 cursor color reset requires a real display — headless backends have no color palette to reset
Reset pointer fg color (OSC 113)? unknown
Reset pointer bg color (OSC 114)? unknown
Reset highlight background (OSC 117)✓ yes
Reset highlight foreground (OSC 119)✓ yes
Cursor color (OSC 12)✗ noOSC 12 cursor color query requires a real display — headless backends have no color palette to query
OSC 133;A prompt start (FTCS_PROMPT)✓ yes
OSC 133;B command start (FTCS_COMMAND_START)✓ yes
OSC 133;C command executed (FTCS_COMMAND_EXECUTED)✓ yes
OSC 133;D command finished (FTCS_COMMAND_FINISHED)✓ yes
OSC 133;P properties✓ yes
iTerm2 Capability Reporting (OSC 1337)✗ noiTerm2-specific protocol not supported
iTerm2 Cell Size Reporting (OSC 1337)✗ noiTerm2-specific protocol not supported
Highlight background (OSC 17)✗ noOSC 17 highlight background query requires a real display — headless backends have no color palette to query
Set Wayland app-id (OSC 176)? unknown
Highlight foreground (OSC 19)✗ noOSC 19 highlight foreground query requires a real display — headless backends have no color palette to query
Window title (OSC 2)✓ yes
Kitty color protocol (OSC 21)✗ noKitty color protocol (OSC 21) not implemented in xterm.js
Pointer shape (OSC 22)? unknown
Kitty color stack push (OSC 30001)? unknown
Systemd context (OSC 3008)? unknown
Kitty color stack pop (OSC 30101)? unknown
Color palette (OSC 4)✗ noOSC 4 color query requires a real display — headless backends have no color palette to query
Audio sound (OSC 440)? unknown
Special color (OSC 5)✗ noOSC 5 special color query requires a real display — headless backends have no color palette to query
Clipboard access (OSC 52)✗ noOSC 52 clipboard not implemented in xterm.js
OSC 52 clipboard read✗ noOSC 52 clipboard read not implemented in xterm.js
OSC 52 clipboard write✓ yes
OSC 5522 advanced clipboard✗ noOSC 5522 not implemented in xterm.js
Screen flash (OSC 555)? unknown
OSC 633;A prompt start✓ yes
OSC 633;B prompt end✓ yes
OSC 633;C pre-execution✓ yes
OSC 633;D command finished✓ yes
OSC 633;E set commandline✓ yes
OSC 633;P properties✓ yes
OSC 66 text sizing✗ noOSC 66 text sizing not implemented in xterm.js
VTE termprop (OSC 666)? unknown
Current directory (OSC 7)✗ noOSC 7 not implemented in xterm.js headless
Locale query/set (OSC 701)? unknown
Version query (OSC 702)? unknown
Set normal font (OSC 710)? unknown
Scroll view up (OSC 720)? unknown
Cell size report (OSC 776)? unknown
Notifications (OSC 777)? unknown
Font size query/set (OSC 7770)? unknown
Font + window size (OSC 7777)? unknown
Hyperlinks (OSC 8)✓ yes
OSC 9;4 progress bar? unknown
Desktop notifications (OSC 99)? unknown
Text reflow on resize✓ yes
Semantic prompts (OSC 133)✗ noNot implemented in xterm.js
Sixel graphics✗ noNot implemented in xterm.js
Sixel support in DA1✗ noSixel not implemented in xterm.js
Sixel geometry report (CSI ? Pi;Pa;Pv S)✓ yes
24-bit truecolor✓ yes

Input Protocols

FeatureSupportNotes
Button-Event Mouse (1002)✓ yes
CSI u Key Encoding✗ noCSI u keyboard protocol not implemented
Kitty click events? unknown
modifyOtherKeys✗ nomodifyOtherKeys not implemented in xterm.js
modifyOtherKeys mode 3✗ nomodifyOtherKeys mode 3 not implemented in xterm.js
Pixel Mouse Reporting (1016)✗ noSGR pixel mouse mode not implemented in xterm.js
urxvt Mouse Reporting (1015)✗ nourxvt mouse mode (?1015) not implemented
X10 Mouse Tracking (9)✓ yes

Scrollback

FeatureSupportNotes
Scrollback accumulates✓ yes
Alt screen separate scrollback✓ yes
DECSTBM constrains scrolling✓ yes
DECSTBM reset to full screen✓ yes
Reverse index (RI)✓ yes
Scroll down (SD)✓ yes
Scroll up (SU)~ partialHeadless API reads from buffer, not viewport after scroll
Scroll region (DECSTBM)✓ yes
Total line count✓ yes

Text

FeatureSupportNotes
Backspace (BS)✓ yes
Basic text rendering✓ yes
CBT backward tab (CSI Z)✓ yes
CHT forward tab (CSI I)✓ yes
Combining characters (0 cols)✓ yes
Carriage return✓ yes
HTS set tab stop (ESC H)✓ yes
Index (IND)✓ yes
Line feed✓ yes
Next line (NEL)✓ yes
Overwrite at cursor✓ yes
Reverse Index at Scroll Top✓ yes
Tab stops✓ yes
TBC clear tab stop (CSI g)✗ noTab stop clear (TBC) not implemented in xterm.js headless mode
CJK wide chars (2 cols)✓ yes
Emoji wide chars (2 cols)✗ noHeadless mode reports emoji as single-width
Regional indicator flags (2 cols)✗ noEmoji flag sequences not rendered as wide characters
Variation selector 16 (emoji presentation)✗ noVS16 emoji variation selectors not handled
Emoji ZWJ sequences (2 cols)✓ yes
Text wraps at width✓ yes