ANSI Escape Sequence Inspector
Inspect terminal output containing ANSI control sequences. Remove styling codes, replace recognized sequences with readable labels, or list sequence types and positions. CSI, SGR, OSC (including BEL and ST terminators), and malformed escapes are handled locally.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
The three operations
Choose strip to remove recognised escape sequences, visualize to replace each with a readable label such as [SGR 31] or [OSC 8; ... (BEL)], or analyze to get a table of every sequence with its offset, kind, readable form and raw bytes. Each operation also reports how many sequences were found and how many were left untouched.
What counts as a sequence
The scanner recognises CSI sequences, which start with ESC [ and end in a final byte from @ to ~ (colour, cursor movement and screen erasure), and OSC sequences, which start with ESC ] and end with BEL or ESC backslash (window titles, hyperlinks, clipboard calls). Other escape forms, C1 controls and stray ESC bytes count as malformed and are left in place.
Strip versus visualize
Strip is the everyday answer, clearing a coloured test run or a remote log before it goes into a plain-text document. Visualize is for debugging your own tooling, showing the codes the way a terminal reads them. Analyze is the most detailed, for auditing exactly which codes a program emits.
OSC payloads, and where this runs
Analysis and visualization print OSC payloads literally, because that is the point of the tool. Hyperlinks and some title or command sequences can carry URLs or shell commands, so avoid sharing output from a private source. The scan is a pure string pass in this tab, so cleaning a sensitive log never sends it anywhere.
Questions
Which codes are recognized?
CSI sequences are recognized by their ESC [ prefix and final byte; OSC sequences begin with ESC ] and end with BEL or ESC backslash. Other C1 or terminal-specific controls are not interpreted.
Does stripping ANSI codes remove all control characters?
No. This utility removes recognized CSI and OSC sequences only. Newlines, tabs, carriage returns and unsupported control bytes are preserved.
Can OSC sequences contain sensitive links?
OSC payloads are shown literally in analysis and visualization output. Avoid sharing the output if it contains private terminal hyperlinks or commands.
Related tools
See categoryString Escaper
Escape or unescape text for JS, JSON, C, Java, Python, shell, SQL, CSV, HTML, XML, URL, backslash or Unicode.
HTML to Plain Text
Strip HTML tags to clean, readable plain text — entities decoded, block layout preserved.
.dockerignore Generator
Build a .dockerignore for a lean Docker build context — pick a stack preset and add custom lines.
Avro Inspector
Read an Apache Avro object-container file on-device: magic, schema, codec, sync markers and data blocks.