File Extension Detector

File Extension Detector

The file extension detector looks at the first bytes of a file, its “magic number”, to tell you what the file really is, then compares that with the extension in its name. Use it when a file will not open, was renamed by mistake, came with no extension, or looks suspicious. The file is read in your browser and never uploaded.

Checks file contentsDocuments, images, archives, mediaFile never uploadedLast updated: November 4, 2026

Detect a file’s real type

How detection works

Most file formats begin with a fixed pattern of bytes. A PDF starts with %PDF-, a PNG with the bytes 89 50 4E 47, a JPEG with FF D8 FF. This tool reads the start of your file, matches it against a list of known signatures and, for ZIP-based formats, looks inside the package to tell Word, Excel, PowerPoint, EPUB, OpenDocument, Java and Android files apart. Text files are recognised by the absence of binary control characters, then sorted into HTML, XML, SVG, JSON or plain text.

Signatures we recognise

GroupTypes
DocumentsPDF, DOCX, XLSX, PPTX, ODT, ODS, ODP, RTF, EPUB, old Office files (DOC, XLS, PPT)
ImagesJPEG, PNG, GIF, WebP, BMP, TIFF, ICO, HEIC, SVG
Audio and videoMP3, WAV, FLAC, OGG, MP4, MOV, AVI, MKV and WebM
ArchivesZIP, GZIP, RAR, 7-Zip, JAR, APK
OtherSQLite, Windows and Linux executables, fonts (TTF, OTF, WOFF, WOFF2), HTML, XML, JSON, scripts, plain text

If the extension does not match

  • Renamed by mistake: rename the file to the detected extension and try again.
  • Downloaded as the wrong type: a “PDF” that is really an HTML page is usually an error page or login screen.
  • Suspicious files: an “invoice.pdf” that is really an executable is a warning sign. Do not open it.
Important: renaming a file does not convert it. A PNG renamed to .jpg is still a PNG. To change format, use a converter such as the JPG to PNG converter.

Frequently asked questions

Is my file uploaded?

No. The tool reads the start of the file in your browser. ZIP-based files are also unzipped locally to look at their contents.

Why does it say “Plain text”?

The file contains no binary markers, so it is text. Source code, CSV and log files all look like plain text at the byte level.

Can it be fooled?

A file can be crafted to start with the bytes of one type and contain another. This tool is a quick check, not a security scanner.

Scroll to Top