Skip to main content

Text & Lists

ANSI Escape Codes Remover

Remove CSI colour codes, OSC hyperlinks, and terminal control strings from pasted logs. Preserve ordinary text and line endings.

Tool workspace

Your input stays in this browser.

The tool is ready to run.

Ready

Run the tool when your input is ready.

Paste actual terminal control characters. Visible text such as \x1b is not an escape character.

Ready for a result

Remove CSI colour codes, OSC hyperlinks, and terminal control strings from pasted logs. Preserve ordinary text and line endings.

This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.

The remover discards terminal control sequences, including CSI commands and OSC hyperlink destinations.

Ordinary text and hyperlink labels remain. Tabs, carriage returns, line feeds, backspace, and NUL also remain.

  • Remove colour commands from captured compiler output before comparing two build logs.

Sources: xterm: control bytes, CSI, OSC, and control strings

Remove colour and hyperlink controls

Input: PASS ]8;;https://example.com\report]8;;\

Settings: Actual ESC characters; CSI colour controls and OSC 8 hyperlinks.

Result: PASS report

The sample contains real control characters. Run working sample inserts them directly; the output contains only PASS report.

Paste control characters and inspect plain text

  1. Paste actual control characters from the log.
  2. Run the remover.
  3. Compare the remaining words with the source before copying them.
  • Incomplete control strings cause an error.
  • Removing cursor commands does not reconstruct the final screen.
  • The operation does not sanitize HTML or decode visible escape notation.