Open and filter a log file in your browser
Drop a log file to scroll through it, show only the lines that contain some text, or jump straight to a line number. It is read on your own device, so nothing is uploaded.
How large a file it handles
The page reads the file a few megabytes at a time and draws only the lines in view, so scrolling stays smooth however long the log is. On a recent computer, a log of a few hundred megabytes opens in a second or two, and a filter over it takes about as long.
The text does have to fit in the browser's memory, which takes roughly as much as the file's size. Past a gigabyte or so a browser tab can run out, and on a phone the limit is lower. The page warns you before it starts on a file that large.
Filter, jump and color codes
Type into the filter box to see only the lines that contain that text, ignoring case, with the count of matching lines and each match marked. Line numbers stay those of the original file, so a line you find can be quoted or found again. Go to line scrolls to a line number; with a filter on, it goes to the next line that matches.
Logs saved from a terminal, Docker or a CI job are often full of ANSI escape codes, the hidden sequences that turn text red or bold. The page hides them by default, and the filter matches the text as you see it. Tick “Use the log’s own ANSI colors” to see the colors themselves, or use the ANSI code remover to copy a cleaned log.
Where the Mac app does more
Log Viewer maps a file instead of reading it into memory, so a two-gigabyte log opens as fast as a small one. Follow keeps the view at the end of a file that is still being written and survives rotation and truncation. Its filter takes regular expressions, can bring back context lines around each match, and exports the filtered lines to a new file. It also paints ANSI colors, opens .gz and .bz2 logs directly, redacts tokens, email addresses and IP addresses when you copy or export, and puts two logs side by side. Open a huge log file on a Mac explains how.
FAQ
Is my log uploaded?
No. The file is read and filtered inside your browser, which suits logs with internal hostnames, user data or tokens.
The site does count page views and which tools are used with Google Analytics, which is never given your files or anything you type. Privacy has the details.
Which files can it open?
Any text file, whatever its name: .log, .txt, .out, rotated files such as app.log.1, and files with no extension. It reads them as UTF-8, and lines ending in either Unix or Windows line breaks. Compressed .gz files need unpacking first.
Can it follow a log as it is written?
No. A web page only sees the file as it was when you chose it. Choose it again to see new lines, or use Log Viewer on a Mac, which follows a file as it grows.
Does the filter take regular expressions?
No, it matches plain text, ignoring case. Log Viewer for Mac takes regular expressions too, and marks where the matches fall on the scrollbar.
Why is a long line cut short?
Drawing a line hundreds of thousands of characters long would freeze the page, so a row shows the first 4,000 characters and says how many more there are. The filter still searches the whole line.
Reading logs on a Mac?
Log Viewer opens gigabyte files instantly, follows a log while it is written, filters with regular expressions and context lines, and exports what is left.
FreemacOS