File inspection

File extension mismatch checker.

Pick files or a whole folder and see which ones are not what their names claim. Only the start and end of each file is read, in your browser, and nothing is uploaded.

Does the file extension match what is inside?

A file name ends in a label such as .pdf or .jpg, but the label is not part of the data. Operating systems, email gateways and upload forms often trust it anyway. This checker reads the real start of each file, works out what it is, and compares that with the extension on the name. Files that disagree are flagged, so you can find the renamed photo, the "PDF" that is really an HTML error page, or the program wearing a document's name.

Unlike checking one file at a time, you can point it at a whole folder of up to 2,000 files, filter down to the ones that need attention, and download a CSV of the full result. Everything happens in your browser: the tool reads only the start and end of each file (the first and last 64 KiB, plus a ZIP's directory) and sends nothing anywhere.

How a file is judged

  1. The content is identified from its magic bytes with the same table as the file type detector. ZIP files are opened far enough to tell Office, OpenDocument, EPUB, JAR and APK packages apart.
  2. The extension is taken from the last dot in the name, lower-cased.
  3. The two are compared and one of these results is shown:
    • Matches: the content is the type the extension names.
    • Consistent: the content is in the same container family as the extension (a ZIP for a .docx whose package type could not be confirmed, an ISO base media file for a .mp4 or .m4a). The family fits, but the exact member could not be checked.
    • Mismatch: the content is clearly a different type, for example a PNG named .jpg or a .xlsx package named .docx.
    • Likely mismatch: a type that normally has a recognisable signature starts with something unrecognisable. The file may be damaged, truncated, encrypted, or simply misnamed.
    • Cannot verify and extension not in table: the tool has nothing reliable to compare, which is not the same as a problem.
  4. The name itself is checked for double extensions such as invoice.pdf.exe and for invisible right-to-left override characters that make a name display backwards.

Worked example

You download a statement called statement-march.pdf and your reader says it is damaged. The checker reports "Mismatch: the extension says .pdf but the content looks like HTML text", because the file begins with <!DOCTYPE html>. The server returned a sign-in or error page and the browser saved it under the expected name. Signing in again and re-downloading fixes it. A second file in the same folder, logo.jpg, reports "Mismatch: PNG image": it displays fine in most programs but a strict upload form that checks the content will reject it, so export a real JPEG.

Why mismatches matter

Common mistakes

What this tool does not do

Privacy

The checker runs in an isolated frame that has no network access. Folder selection uses your browser's own file picker; the tool receives the file names and slices you choose and nothing else. The CSV is built in memory and saved by your browser, never sent to a server. The advertising on this page lives outside the frame and cannot see your files or their names.

Common mix-ups

  1. W3C: Portable Network Graphics (PNG) Specification, PNG file signature
  2. W3C: ITU-T T.81 (JPEG), start-of-image marker

Checked against these sources on .

Frequently asked questions

How do I check whether a file extension matches its content?

Choose the files or a folder here. Each file is identified from its first bytes and compared with the extension in its name. Matches, mismatches and cannot-verify cases are listed per file and can be exported as CSV.

What does a mismatch mean?

The name says one type and the content looks like another, for example a PNG named .jpg or an HTML error page named .pdf. It is a reason to look closer, not proof that the file is dangerous.

Can this tell me if a file is a virus?

No. It compares the name with the content type only. It does not scan for malware, and a file whose extension matches can still be malicious.

Why is a .docx or .xlsx flagged?

Those files are ZIP packages. If the package contains the parts of a different Office type, or is a plain ZIP with no Office parts, the tool reports it. A damaged or hand-built package can also trigger this.

Why does my .csv or .txt show as consistent only?

Text formats have no signature. The tool confirms the content reads as text and that the extension is a text extension, but it cannot confirm the file is valid for that format.

What is a double extension?

A name like invoice.pdf.exe. Windows can hide known extensions, so only .pdf may be visible while the file is really a program. The checker warns when a document-style extension is followed by a program or script extension.

Are my files uploaded?

No. Only the first and last 64 KiB of each file, plus the directory of a ZIP-based file, are read, inside a frame with no network access and no advertising or analytics code.

How many files can I check?

Up to 2,000 per run. The page shows the first 500 matching rows and the CSV contains all results.

Sources

Sources last checked 2026-11-11.

Advertisement
Advertisement