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

77%
113 passed · 10 partial · 24 failed of 147 features
Tested: March 26, 2026
Analysis2026-03-26

xterm.js scores 81% (122/151) on the terminfo.dev feature matrix, with gaps in the Modern TUI, Rich TUI, Unicode baselines. Ranks #12 of 13 tested terminals. Missing 29 features.

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
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
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

Device Status

FeatureSupportNotes
Mode Report (DECRPM)✓ yes
Request Setting (DECRQSS)✓ yes
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
Terminal Version (XTVERSION)✓ yesXTVERSION not implemented in xterm.js

Extensions

FeatureSupportNotes
iTerm2 Inline Images (OSC 1337)✗ noiTerm2 inline images not implemented in xterm.js
Kitty graphics protocol✗ noNot implemented in xterm.js
Kitty keyboard protocol✗ noNot 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
Foreground color query (OSC 10)✗ nonot supported
Background color query (OSC 11)✗ nonot supported
iTerm2 Capability Reporting (OSC 1337)✗ noiTerm2-specific protocol not supported
iTerm2 Cell Size Reporting (OSC 1337)✗ noiTerm2-specific protocol not supported
Window title (OSC 2)✓ yes
Clipboard access (OSC 52)✗ nonot supported
OSC 5522 advanced clipboard? unknownOSC 5522 not implemented in xterm.js
OSC 66 text sizing? unknownOSC 66 text sizing not implemented in xterm.js
Current directory (OSC 7)✗ noOSC 7 not implemented in xterm.js headless
Hyperlinks (OSC 8)✓ yes
OSC 9;4 progress bar? 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
24-bit truecolor✓ yes

Input Protocols

FeatureSupportNotes
Button-Event Mouse (1002)✓ yes
CSI u Key Encoding✗ noCSI u keyboard protocol not implemented
modifyOtherKeys✗ nomodifyOtherKeys not implemented in xterm.js
modifyOtherKeys mode 3? unknownmodifyOtherKeys 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

Modes

FeatureSupportNotes
Enter alt screen (DECSET 1049)✓ yes
Exit alt screen (DECRST 1049)✓ yes
App cursor keys (DECCKM)✓ yes
Application keypad (DECKPAM)✓ yes
Auto-wrap (DECAWM)✓ yes
Bracketed paste (DECSET 2004)✓ yes
Mode 2031 color scheme reporting? unknownMode 2031 not implemented in xterm.js
Focus tracking (DECSET 1004)✓ yes
Insert/replace mode (IRM)✓ yes
Left/Right Margins (DECLRMM, Mode 69)✗ noDECLRMM not implemented in xterm.js
All motion mouse (DECSET 1003)✓ yes
SGR mouse mode (DECSET 1006)~ partialSGR mouse encoding not exposed in xterm.js headless mode
Mouse tracking (DECSET 1000)✓ yes
Origin mode (DECOM)✓ yes
Reverse video (DECSCNM)~ partialParser handles DECSCNM but headless mode doesn't expose the state
Synchronized output (DECSET 2026)✓ 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
Combining characters (0 cols)✓ yes
Carriage return✓ yes
Index (IND)✓ yes
Line feed✓ yes
Next line (NEL)✓ yes
Overwrite at cursor✓ yes
Reverse Index at Scroll Top✓ yes
Tab stops✓ yes
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

Powered by Termless
Playwright for Terminals