Dev / Files

File Inspector.

Drop in any file and find out what it actually is — read from its magic bytes, not its name. It recognizes 50+ formats, flags when an extension lies about the contents, shows a hex header preview, and can re-download the file with a corrected extension or convert common images between PNG, JPEG, and WebP. Everything happens in your browser; the file is never uploaded.

Drop a file here
or click to choose · only the first few bytes are read · nothing is uploaded
📄
Filename
Size
Typical extension
Category
Header bytes (hex · ascii)

Change type

Re-typing renames the file and relabels its MIME — the bytes are unchanged. Image conversion actually re-encodes the pixels.

or set extension
Convert image to

How a file knows what it is.

Extensions are just a hint. The .png at the end of a filename is a label anyone can change; it doesn't touch the contents. What actually identifies a file is its magic number — a short, fixed byte sequence at the very start. A PNG always begins 89 50 4E 47 ("\x89PNG"); a PDF begins 25 50 44 46 ("%PDF"); a ZIP begins 50 4B 03 04 ("PK\x03\x04"). This tool reads those bytes and tells you the truth.

Why it matters. A file named invoice.pdf that's really a ZIP, or an image that won't open because its extension is wrong, are everyday problems. Detecting the real type lets you fix the extension so your OS opens it with the right app — which is exactly what the "re-download as detected type" button does. (Note: some formats share a container — .docx, .xlsx, and .jar are all ZIP archives underneath, so they read as ZIP.)

Reading vs. converting. Fixing an extension changes the label, not the data — handy, but it can't turn a real PDF into a real PNG. Genuine conversion means re-encoding the bytes, which browsers can do natively for raster images (via an offscreen <canvas>). That's why image conversion is offered and arbitrary format-to-format transcoding isn't: the honest client-side boundary is real codecs, not wishful renaming.

Ready