← All text tools

ANSI Escape Code Stripper and Viewer

Strip ANSI colour and cursor codes from copied terminal output, or render the colours as HTML so CI logs and command output stay readable.

  • Free
  • No sign-up
  • Works on any device

About ANSI Escape Code Stripper and Viewer

Terminals add invisible escape sequences to colour text and move the cursor. Copied into a ticket or a log file they appear as junk such as ^[[31m or [0m. Paste the output here to strip every sequence to plain text, or render the colours as HTML spans you can paste into a page or report. Bold, underline, inverse, the 16 standard colours, 256 colours and true colour are understood. Example: ESC[31mError ESC[0m becomes the word Error in red, or just Error with the codes removed.

How to use ANSI Escape Code Stripper and Viewer

  1. Paste the terminal output, with or without the visible escape characters.
  2. Choose Strip all codes to plain text, or Render the colours as HTML.
  3. Copy the result, or download it as a text or HTML file.

Why use this tool?

Also known as

Frequently asked questions

Why does my copied log show ^[[31m instead of colours?

The escape character cannot be displayed, so tools show it as ^[ or as the text x1b. Keep the option that reads typed escapes switched on and this page treats them as real escape codes.

Does stripping ANSI codes change the text itself?

No. Only the escape sequences are removed, so words, spaces, tabs and line breaks stay exactly as they were. Carriage returns and backspaces used for progress bars are kept as well.

Is the HTML output safe to paste into a web page?

The text is escaped, so characters such as < and & are shown as text, not as markup. The output is a pre block with inline colours and needs no stylesheet.

Is ANSI Escape Code Stripper and Viewer free?

Yes. ANSI Escape Code Stripper and Viewer on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.