Skip to content

Strip ANSI escape codes

Remove ANSI color and cursor-control codes from terminal output, leaving clean readable text.

Input

Strip ANSI escape codes

Paste a snippet of terminal output, a CI build log or a program's console output and this tool strips the ANSI escape codes underneath, leaving plain, readable text. It handles SGR codes (colors, bold, underline), cursor-movement and erase sequences, and OSC codes for hyperlinks and window titles — the invisible bytes that turn into garbled characters like "^[[32m" once a colored log gets pasted somewhere that doesn't render them.

Turn on "Remove only colors" to strip just the SGR codes and leave everything else untouched, useful when you need to keep replaying the raw stream elsewhere. "Convert colors to" swaps plain removal for Markdown or HTML: bold, italic and underline carry over in both, and foreground colors become inline styles in HTML — Markdown has no native color syntax, so only the text styles survive there. "Collapse redrawn lines" is built for progress bars and spinners that repaint the same line with a carriage return, keeping only the final state of each line instead of every intermediate percentage. "Convert terminal hyperlinks to plain text" removes the OSC 8 wrapper around clickable links while keeping the link's visible text.

The tool treats Windows (CRLF) and Unix (LF) line endings the same, copes with build output well past 100,000 characters, and the tally under the output reports characters in, characters out and how many escape sequences were removed.

Everything runs in your browser. Terminal output and log files are safe to paste even with internal hostnames, paths or stack traces in them — nothing is uploaded. Copy the cleaned text, download it as a .txt file, or send it into another tool's input to keep cleaning up.

FAQ

What counts as an ANSI escape sequence?
Any byte sequence starting with the ESC character (0x1B) that terminals use as instructions rather than visible text — SGR codes for colors and bold/underline, CSI codes for cursor movement and erasing, and OSC codes for hyperlinks and window titles. This tool recognizes and removes all of them.
Can I keep the colors instead of removing them?
Yes — set "Convert colors to" to Markdown or HTML instead of Remove. Bold, italic and underline are preserved in both formats; foreground colors only carry over in HTML, since Markdown has no native way to express color.
What happens to progress bars that redraw the same line over and over?
By default every carriage-return redraw stays in the output as raw text. Turn on "Collapse redrawn lines" to keep only the last state of each line, so a progress bar collapses to its final "100%" instead of every intermediate step.
Do clickable terminal links survive?
Yes. With "Convert terminal hyperlinks to plain text" on (the default), the OSC 8 escape wrapper is removed but the link's visible text stays in the output. Turn it off to leave those codes untouched instead.
Is my terminal output or log file uploaded anywhere?
No. Stripping ANSI codes runs entirely in your browser — logs and console output, even ones with internal paths or hostnames, never leave your device.