The complete 128-entry ASCII table with decimal, hex, octal and binary values, names and escapes.
Color Escape Sequence Viewer
A reference table of ANSI escape sequences for terminal colour and text attributes, with CSS equivalents.
- Free
- No sign-up
- Runs in your browser
Input
The full table is shown; use your browser’s find to search it.
Ready
Everything happens on this device. No upload, no account, no network request.
How to use this tool
- 1
The SGR sequences terminals use for colour and text attributes are listed below.
- 2
Each entry shows the escaped form you would write in code, and a CSS equivalent where one exists.
Questions about Color Escape Sequence Viewer
How do I write the escape character?
It depends on the language. `\e` works in `echo -e` and in printf on most shells; `\033` and `\x1b` are the octal and hex forms and work almost everywhere; JavaScript, Python and Go all accept `\u001b`. All four produce byte 27.
Why do the colours look different in my terminal?
Because the 16 basic colours are names, not values - each terminal theme decides what "red" looks like. The CSS equivalents here use the standard xterm palette as a reference. For exact colours use the 256-colour (`38;5;n`) or 24-bit (`38;2;r;g;b`) forms.
How do I strip these from captured output?
Match the CSI pattern `\x1b\[[0-9;]*m` for colour codes, or the broader `\x1b\[[0-?]*[ -/]*[@-~]` for all CSI sequences. Remember OSC sequences too (hyperlinks, window titles), which terminate differently - with BEL or ESC backslash.
Is my data sent anywhere?
No. This tool runs as JavaScript inside your browser tab. There is no network request carrying your input, nothing is written to a server log, and it keeps working with your connection switched off. You can confirm it in the browser’s network panel. That matters more here than elsewhere on the site: developer tools handle tokens, keys and production data.
Does the Color Escape Sequence Viewer work offline?
Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the Color Escape Sequence Viewer keeps working with the network switched off and nothing is ever sent to a server.
Related tools
Other tools you might reach for next.
Break text into code points with hex values, Unicode block, category, UTF-8 bytes and UTF-16 units.
Format and indent JSON, with optional alphabetical key sorting and a precise syntax error when it will not parse.
Strip every byte of insignificant whitespace from JSON and report the saving.
Check that JSON is syntactically valid, report its structure, and flag duplicate keys that JSON.parse accepts silently.
Compare two JSON documents structurally, by path, distinguishing a type change from a value change.
Evaluate a JSONPath expression against a document and see every match with the path that produced it.
Escape text so it can be embedded as a JSON string value, handling control characters and astral code points.