Safely Convert ANSI Terminal Logs to HTML
For developers and DevOps engineers who need to embed terminal or build logs in web pages without XSS risks. Paste ANSI output, get sanitized HTML that preserves colors and formatting while neutralizing malicious scripts.
Results update live as you type — no button needed. The Example button fills a sample input.
🔒 You've used your 20 free runs for today
Every tool is free up to 20 conversions a day. Get Pro — $4.99 one-time to unlock every tool with no daily limit.
💳 Buy Pro — $4.99 🔓 I have a code
Free runs reset at midnight (UTC).
Why use ANSI to HTML Sanitizer?
Neutralizes XSS payloads like <script> tags and event handlers
Preserves ANSI color codes and terminal formatting
Output is ready to embed in build log viewers and dashboards
No data leaves your browser - all processing is client-side
Works with logs from CI/CD, SSH sessions, and command-line tools
FAQ
What is ANSI to HTML conversion?
ANSI escape codes are used in terminal output to add colors and formatting. Converting them to HTML lets you display colored logs in a web browser. Our tool also sanitizes the output to prevent XSS attacks.
Why is sanitization important?
Terminal logs can contain malicious input, such as <script> tags from user data. Without sanitization, embedding raw logs in HTML can lead to XSS vulnerabilities, as seen in the ansi2html incident affecting Sourcehut. Our tool escapes dangerous characters.
Does this tool preserve colors?
Yes, the sanitization process escapes HTML but leaves ANSI escape sequences intact. You can then use a safe ANSI-to-HTML renderer that handles colors without executing scripts.
Is my data sent to a server?
No, all processing happens in your browser. Your logs never leave your device.