Toolman

.log — Log File

Text text/plain

What a .log file is

Plain text output from an application or system, usually one timestamped event per line.

How to open it

Any text editor. For large files use tail -f, less, or ripgrep rather than opening the whole thing.

Worth knowing

Log files grow without bound unless rotated. A full disk from unrotated logs is a classic 3 a.m. incident.

How to identify a .log file

A file's extension is only its name — renaming a.png to a.log changes nothing inside. What software actually reads is the magic number, the first few bytes of the file.

Signaturenone
MIME typetext/plain
CategoryText

Plain text.

# what is this file really?
file mystery.log

# look at the first bytes yourself
xxd mystery.log | head -2
head -c 16 mystery.log | xxd

# Windows PowerShell
Get-Content mystery.log -AsByteStream -TotalCount 16 | Format-Hex

Frequently asked questions

What is a .log file?

Plain text output from an application or system, usually one timestamped event per line.

How do I open a .log file?

Any text editor. For large files use tail -f, less, or ripgrep rather than opening the whole thing.

Is .log safe to open?

Yes. A .log file is data, not code — opening one cannot execute anything by itself.

Can I change a file's extension to convert it?

No. Renaming changes the label, not the bytes. The one place it appears to work is between formats that genuinely share a container — renaming .docx to .zip works because a DOCX is a ZIP. Everything else needs a real converter.

Other text formats

Other formats

All file formats