Skip to content
All Tools

Analyze JPG · PNG · WebP · AVIF · GIF · BMP · SVG · TIFF · ICO 100% local

Image Format Checker

Detect the real format and MIME type of an image file.

Runs in your browser — your image never leaves your device Updated September 2026

Processed directly in your browser. Your image never leaves your device.

About this tool

The Image Format Checker identifies what an image file actually is by reading its binary signature - the magic bytes at the start of the data - instead of trusting the file name. Feed it almost any image and it returns three things: the detected format, the MIME type that matches that format, and whether the file extension agrees with what the bytes reveal.

File extensions are labels, and labels are easy to lie about. Renaming photo.jpg to photo.png changes nothing inside the file; the content remains a JPEG while every program that reads the extension now expects PNG. The mismatch confuses operating systems, browsers, CDN rules and image tooling, and resolving it by inspection is exactly the scenario this checker exists for.

The detection itself is fast because it does not decode the image. The checker reads a small leading window of bytes - typically under 32 - and compares them against a table of known signatures. JPEG starts with FF D8 FF, PNG with 89 50 4E 47, GIF with 47 49 46 38, and BMP with 42 4D; WebP, AVIF, TIFF and ICO follow their own patterns. The comparison takes microseconds.

The result is a verdict, not a guess. When the extension matches the signature, the checker reports a clean agreement. When the file was renamed or mislabeled, it shows the mismatch and the true format, so you can correct the extension before serving the file anywhere that cares.

Use it when an upload silently fails, when a downloaded asset opens in the wrong application, when a CDN serves a file with an unexpected Content-Type, or when you inherit a folder of mystery files and want the truth in one pass. It pairs naturally with the MIME Type Checker when you need the raw MIME string and with the Content-Type Checker when your goal is the exact HTTP header for a server rule.

Everything runs locally in your browser. Only the leading bytes are read and nothing is uploaded, so files up to the practical 25 MB ceiling are safe to inspect even when sensitive, and the original is never modified. If no signature matches, the file is reported as unknown - which usually means corrupt, truncated, or a format outside the recognized set.

How to use Image Format Checker

  1. Drop or select any image file in the tool.

  2. Review the detected format, MIME type and extension comparison shown immediately.

  3. If there is a mismatch, rename the file extension to match its actual format.

What this tool does

  • Signature-based detection.

  • MIME type output.

  • File extension comparison.

Specifications

Input formats JPG, PNG, WebP, AVIF, GIF, BMP, SVG, TIFF, ICO
Processing Local browser (Canvas API)
Uploads None — files stay on your device
Max file size 25 MB per file
Original file Never modified
Supported formats JPG, PNG, WebP, AVIF, GIF, BMP, SVG, TIFF, ICO
Output Detected format, MIME type, extension match status

In-depth Guide

Magic bytes: the signature every format leaves behind

Nearly every file format declares its identity in the first bytes of its data. These are called magic bytes or file signatures, and they exist so that parsers - browsers, image libraries, operating systems - can recognize a format without being told what it is. The sequence is often a deliberate brand marker or a product of the format's design history, and it is stable across every file of that type.

For the checker this stability is the whole foundation. Read the leading window, compare it to a known table, and the format resolves itself with no dependence on the file name, the download source, or the folder the file arrived from. The extension is only a convenience label; the signature is ground truth.

  • JPEG begins FF D8 FF - a binary opener shared by every JPEG ever written.
  • PNG embeds its own name: 89 50 4E 47 spells the format in its first meaningful bytes.
  • GIF writes the letters GIF plus a version marker such as 89a.
  • BMP opens with 42 4D, the ASCII characters for Bitmap.
  • WebP is a RIFF container, so it starts with RIFF and carries WEBP a few bytes later.
  • AVIF is an ISO base media file, announced by an ftyp box near offset 4.

File signatures the checker recognizes

Every supported type is listed with the byte pattern used for detection and the MIME type that the detected format maps to. Keeping both in one place means the extension comparison has an authoritative reference: the checker decides the format from bytes before it ever compares a name.

Recognized formats span the everyday raster set plus the vector and container cases - JPG, PNG, GIF, BMP, WebP, AVIF, TIFF, ICO and SVG. If a file belongs to one of these families, its signature will resolve to exactly one row in the table.

Format Signature bytes MIME type
JPEG FF D8 FF image/jpeg
PNG 89 50 4E 47 image/png
GIF 47 49 46 38 image/gif
WebP 52 49 46 46 ... 57 45 42 50 image/webp
BMP 42 4D image/bmp
AVIF ftyp at offset 4 image/avif
TIFF 49 49 2A 00 or 4D 4D 00 2A image/tiff
ICO 00 00 01 00 image/x-icon

When the extension disagrees with the bytes

The comparison step matters because real files really do get mislabeled. Files arrive from scrapers with forced extensions, from scripts that renamed thumbnails, and from email clients that sanitized names. Each case produces a file whose extension and content disagree, and each disagreement can break a downstream system in a characteristic way.

None of the failure modes below are detected by opening the file in a viewer - a viewer that trusts the extension may refuse or misinterpret. That is why signature verification belongs in the workflow rather than in the double-click.

Named as True content Typical symptom
.jpg PNG Browser or CMS rejects the upload as an invalid image
.webp PNG CDN sends image/webp; decoding fails or renders blank
.jpg GIF Only the first frame shows, or the file is refused outright
.svg PNG The SVG handler blocks the file for safety reasons
.png JPEG Tools run it through a PNG pipeline and checksum checks fail

SVG, TIFF and ICO edge cases

Three supported types deviate from the tidy binary-template story, and knowing their quirks prevents confused readouts. SVG is XML text, not binary; it is detected by the XML or SVG tag in the opening text rather than by magic bytes. Heavily minified SVGs can push the identifying tag slightly deeper, which the checker handles by reading a generous leading window.

TIFF declares its byte order in its first two bytes - II for little-endian or MM for big-endian - followed by the pair 2A 00 or 00 2A. ICO files are containers that frequently wrap PNG data, so an ICO can also appear to contain PNG; the checker recognizes the container header first and reports the container, which is the identity most pipelines care about.

  • SVG reports as image/svg+xml with a text-based detection path.
  • TIFF detection respects both endian variants of its header.
  • ICO wrapping PNG is normal; the container is the reported identity.
  • Minified SVG markup stays detectable as long as the tag falls inside the read window.

What a signature can and cannot tell you

Signature detection is excellent at identifying format, but it is deliberately silent about everything else. It cannot tell you whether a JPEG is double-compressed or full of artifacts, whether a PNG is palette-based or photographic, whether an image still has its metadata, or whether a file is genuinely complete rather than truncated mid-way. A file can carry a perfect signature and still be broken afterwards.

The checker is honest about this boundary: its job is identity, not health. When a signature matches but the file still will not open, the failure is downstream of the header - corruption deeper in the data, a download interrupted partway, or an encoder that produced a non-conforming payload.

  • Identity: guaranteed within the supported signature table.
  • Integrity: not assessed - a valid header does not prove a valid body.
  • Origin: not assessed - screenshots, edits and camera exports share signatures.
  • Codec: not assessed - a modern JPEG can still open with the classic FF D8 FF opener.

Fixing a mismatch the right way

When the checker flags a mismatch, resist the urge to brute-force rename. Renaming a PNG file to .jpg changes the label and keeps the bytes, so any pipeline that sniffs or enforces file types will still misbehave. The correct fix is to re-encode the file into the format its name claims, producing a file whose extension and signature genuinely agree.

If you simply want the name to reflect reality, rename the file to match the detected format - a PNG mislabeled as .jpg becomes file.png and the agreement is instantly correct. Choose whichever direction your destination demands, then re-run the checker to confirm the file now reports clean.

  • Rename to the detected format when the name is the lie.
  • Re-encode when the destination insists on a particular extension.
  • Re-download when a file is corrupt beyond the header.
  • Re-check after every change to confirm the verdict flipped to a match.

How it works

Magic-byte signature reading

Every image format has a unique sequence of bytes at its start. JPG files begin with FF D8 FF, PNG files with 89 50 4E 47, and so on. The tool reads those bytes directly from the file and identifies the format irrespective of the filename.

Extension vs. signature comparison

After detecting the true format, the tool checks whether the file extension agrees. A mismatch (e.g. file named .gif but signature is PNG) is flagged so you can correct it.

Example result

Before After
File: photo.webp
Info: Downloaded with a .webp extension.
Detected format: PNG
MIME type: image/png
Extension match: Mismatch - file is not WebP

Your results depend entirely on the file you provide.

Pro tips

Verify before serving

When you place images behind a CDN or a strict CMS, run the format checker first. Header rules are only as correct as the files they describe, and one mislabeled asset can poison an entire batch of uploads.

Process downloads in a batch

Scraped and downloaded folders are the most likely source of mismatched extensions. Drag the whole folder through the checker and sort by mismatch before you spend time on individual files.

Do not trust favicons blindly

ICO files frequently wrap PNG payloads. When a favicon behaves oddly, the format check tells you whether you are looking at a container problem or a payload problem, which changes how you fix it.

Respect the light read path

Only the leading bytes are inspected, so files that are large, sensitive or time-pressed are still cheap to verify. Use the tool liberally; it costs almost nothing per file.

Check before you convert

Choosing a conversion target is easier when the source format is fact. Run the check first so you convert from the real bytes, not from whatever the filename claims.

Keep the MIME string close

The tool returns the MIME type alongside the format. Store it next to the file or in your server header rules so the two never drift apart again.

When to use it

Great for Image Format Checker

  • Investigating a file that was renamed or mislabeled during upload.
  • Confirming the true format of a file before serving it from a CDN with the correct Content-Type header.
  • Checking whether an ICO file is actually a PNG disguised with a different extension.

Watch out for

  • When you only need pixel dimensions, use the Image Dimensions Checker.
  • When you want to visually compare two images, use the Image Compare slider.
  • When you need to extract the exact MIME string for server config, the dedicated MIME Type Checker is more focused.

Privacy

This tool runs entirely in your browser using the Canvas API. Your image is never transmitted — there is no upload endpoint involved. Clearing the page removes the file from memory.

Edits never overwrite your original file. Every result is a new download, so you always keep the source image. Read the privacy policy.

Troubleshooting

The file may be corrupted, or it may be a format the browser cannot identify by signature. Try opening it in a different tool to confirm it is a valid image.

SVG is an XML-based text format. The tool looks for the opening XML or SVG tag rather than binary magic bytes, but heavily minified SVGs may require the full file to be read.

Frequently asked questions

A MIME type (e.g. image/jpeg) identifies the format of file content. It is often separate from the file name extension.

Yes. Web servers and CDNs rely on the extension or a MIME map to set the Content-Type header. If the extension is wrong, browsers may refuse to render the image or may misinterpret it.

No. The internal binary data remains PNG. Only the label (the extension) changes, which can confuse browsers and image processors.

AVIF files report image/avif. This is the official IANA-registered MIME type for the AVIF format.

In practice, no - the registered signatures are distinct by design, which is what makes detection reliable. Ambiguity only appears with containers like ICO that wrap another format, and the checker reports the outer container.

Not alone. If the system validates by bytes, a renamed file is still mislabeled. Re-encode into the format the name claims, or rename to the true format, then re-check to confirm the agreement.

SVG identification looks for the XML or SVG tag in the opening text. Extreme minification can push the tag beyond the first bytes read; a small formatting adjustment usually restores normal detection.

It means the header matches a known format. It does not test the rest of the file or rule out corruption, truncation, or deliberately constructed content. Treat signature verification as one layer of defense, not the whole story.

Yes. The leading bytes simply matched nothing in the supported table - the file may be a valid unsupported format, a truncated image, or unrelated data. Open it in a viewer or re-download it before deciding it is lost.

No. Quality sliders and compression modes change the encoding of pixel data, but the format header is constant. The same file saved at quality 40 and quality 95 still opens with the identical magic bytes.

Technical details

Signature database JPG: FF D8 FF, PNG: 89 50 4E 47, GIF: 47 49 46 38, BMP: 42 4D, WebP: 52 49 46 46, AVIF: ftyp (at offset 4), TIFF: 49 49 2A 00 or 4D 4D 00 2A
SVG detection Looks for <?xml or <svg tag in the first bytes of the file
ICO detection Reads the 00 00 01 00 signature at offset 0
Read strategy First 32 bytes read via ArrayBuffer.slice() for minimal memory use
Extension comparison Case-insensitive match of file extension against detected format label

Tool last updated: September 2026. Browse all image tools.