ANSI Log Renderer
Turn colored terminal output into copyable HTML, or strip escape sequences to plain text. Supports common SGR colors and styles, runs locally in your browser.
What this tool does
Paste raw terminal output, build logs, or CI output that contains ANSI escape
sequences and convert it into clean HTML. Color and style codes such as
\x1b[31m (red), \x1b[1m (bold), and \x1b[0m (reset) become styled
<span> elements inside a <pre>. If you only need readable text, switch the
output to Plain text to remove the escape codes instead.
Everything runs locally in the browser. The input is not uploaded anywhere.
Supported ANSI features
| Feature | Supported |
|---|---|
| 16 basic and bright SGR colors | Yes |
xterm 256-color codes (38;5;n, 48;5;n) | Yes |
24-bit truecolor (38;2;r;g;b, 48;2;r;g;b) | Yes |
| Bold, dim, italic, underline, inverse, strike, conceal | Yes |
| Cursor movement, screen erase, OSC titles/hyperlinks | Dropped, not replayed |
| Full terminal emulation / progress-bar rewrites | Not attempted |
The renderer is best for captured logs where preserving the color semantics is more important than replaying an interactive terminal session.
Examples
| Input | Settings | Output |
|---|---|---|
\x1b[1;32m✓ build passed\x1b[0m | HTML, dark, inline | A dark <pre> with a bold green success line |
\x1b[31mERROR\x1b[0m: not found | HTML, dark, inline | Red ERROR, followed by plain text |
\x1b[38;5;196mred\x1b[0m | HTML, light, classes | A light <pre> with the 256-color red span |
\x1b[2J\x1b[H\x1b[33mwarn\x1b[0m | Plain text | warn |
Output modes
- Colored HTML returns markup you can paste into a report, documentation, or an HTML page. Choose Inline styles for a fully self-contained fragment, or CSS classes + style block when you prefer class names for the common ANSI palette.
- Plain text strips escape sequences and leaves the readable log text, Unicode, tabs, and line breaks.
FAQ
Does this execute or upload my log?
No. It treats your input as text, parses escape sequences locally, and renders the result in the browser. No command is run and nothing is sent to a server.
Will the HTML output safely escape markup in my log?
Yes. Text characters such as <, >, &, and quotes are HTML-escaped before
being placed inside the output. ANSI style spans are generated separately.
Does it support truecolor and 256-color terminal output?
Yes. It understands the common SGR forms for 16-color, bright-color, xterm 256-color, and 24-bit RGB foreground/background colors.
Why do cursor movement effects not appear?
This is a log renderer, not a full terminal emulator. Cursor movement, screen clear, OSC title/link strings, and similar non-SGR control sequences are removed instead of being replayed.
Developer & Automation Access
Run it from the terminal
Same engine as this page, headless — via the gizza CLI:
gizza tool ansi-log-renderer "[1;32m✓ build passed[0m
[31mERROR[0m: missing file"New to the CLI? Get gizza →
Open it by URL
Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:
https://gizza.ai/tools/ansi-log-renderer/?text=%1B%5B1%3B32m%E2%9C%93%20build%20passed%1B%5B0m%0A%1B%5B31mERROR%1B%5B0m%3A%20missing%20file&output=html&theme=dark&styles=inlineMachine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
