Log File to HTML Converter - Pretty Print Logs
Convert raw log files into beautifully formatted, searchable HTML. Supports Log4j, syslog, and custom formats with severity highlighting and filtering.
About
Raw server logs are notoriously difficult to read. A single misread ERROR line buried among 50,000 INFO entries can mean hours of wasted debugging or, worse, a missed production incident. This tool parses plain-text log files, classifies each line by severity level (FATAL, ERROR, WARN, INFO, DEBUG, TRACE), and renders them as a color-coded, searchable, filterable HTML document. It handles common formats including Log4j, syslog, and ISO-8601 timestamped output. Multi-line stack traces are grouped with their parent entry.
The parser operates entirely in your browser. No data leaves your machine. This tool approximates format detection using heuristic pattern matching. It will not correctly parse binary log formats or logs with no recognizable delimiter structure. For logs exceeding 100,000 lines, processing is chunked to prevent browser tab freezing. The converted HTML output can be downloaded as a standalone .html file or copied to clipboard for embedding in incident reports.
Formulas
The parser applies a cascading detection algorithm. Each line is tested against format patterns in priority order. The first match determines the parser used for the entire file.
Where line is the raw text content of a single log entry. Multi-line detection groups continuation lines (stack traces) with the preceding classified entry by checking if a line begins with whitespace, at , Caused by, or ... followed by a number.
Timestamp extraction uses the pattern T = match(line, regexformat) where regexformat is selected during the initial format detection pass over the first 20 lines of the file.
Reference Data
| Log Format | Pattern Example | Timestamp Format | Detection Method |
|---|---|---|---|
| Log4j / Log4j2 | 2024-01-15 10:30:45,123 ERROR [main] com.app.Service - Failed | yyyy-MM-dd HH:mm:ss,SSS | RegExp: date + level + bracket logger |
| Syslog (RFC 3164) | Jan 15 10:30:45 server01 sshd[1234]: Failed password | MMM dd HH:mm:ss | Month-name prefix + hostname |
| Syslog (RFC 5424) | <134>1 2024-01-15T10:30:45.123Z host app - - msg | ISO-8601 | Priority prefix <N> |
| ISO-8601 Generic | 2024-01-15T10:30:45.123Z [ERROR] message here | ISO-8601 with T separator | ISO timestamp + bracket level |
| Apache Access Log | 127.0.0.1 - - [15/Jan/2024:10:30:45 +0000] "GET /" 200 | CLF format | IP prefix + square-bracket date |
| Apache Error Log | [Mon Jan 15 10:30:45.123 2024] [error] [pid 1234] msg | Day-of-week prefix | Double square-bracket pattern |
| Nginx Error | 2024/01/15 10:30:45 [error] 1234#0: *5 msg | yyyy/MM/dd HH:mm:ss | Slash-separated date + bracket level |
| Python Logging | ERROR:root:Something failed | None (level-first) | LEVEL:logger:message pattern |
| Spring Boot | 2024-01-15 10:30:45.123 INFO 1234 --- [main] c.a.App : Started | yyyy-MM-dd HH:mm:ss.SSS | Triple dash separator --- |
| Docker / Kubernetes | {"log":"msg\n","stream":"stderr","time":"2024-01-15T10:30:45Z"} | ISO-8601 in JSON | JSON object with log key |
| Windows Event | Information 1/15/2024 10:30:45 AM Application Event 1000 | US date format | Level-first + US date |
| Custom / Unknown | Any line containing ERROR, WARN, etc. | Heuristic scan | Keyword search fallback |