ANSI Escape Code Renderer: Terminal Colours to HTML
Converts SGR escape codes (16, 256 and true colour, bold, underline) to HTML.
Use the tool
Why this tool exists
Pasting terminal output into a ticket gives lines full of [31m. This tool renders them as colours so the log reads as it did in the terminal.
It also repairs lost escape characters, where only [32m is left. Other control sequences, such as cursor movement, are removed, and carriage-return progress lines keep their last state.
How to use it
- Paste the terminal output.
- Choose preview, HTML source or plain text.
- Leave the repair option on for pasted logs.
- Copy the result.
Frequently asked questions
Which codes are supported?
Reset, bold, dim, italic, underline, strikethrough, reverse, 16 colours, 256 colours and true colour.
Why is the background dark?
Terminal palettes are designed for dark backgrounds, so the preview uses one.
Is the HTML safe?
Text is escaped. Only span styles generated from the codes are added.
Is my log uploaded?
No. Everything is processed in your browser and nothing is sent. Logs can hold IP addresses and tokens, so the page does not write them into the address bar.