DevKits

Image Format Detector — Identify Real Image Type from File Bytes

Detect the real image format by reading file magic bytes — not the extension. Discover if a .png file is actually a JPEG, or if a .jpg is really a WebP. Supports 10+ formats. 100% local.

Last updated:

Comments

Drop images to detect their real format by reading file magic bytes — not the extension. Finds mismatches (a .png that's actually a JPEG).

Drop images or click to browse

What is Image Format Detector?

Image format detection works by reading the first 4-32 bytes of a file — known as magic bytes or file signatures. Every image format starts with a unique byte sequence: PNG begins with 89 50 4E 47, JPEG with FF D8 FF, GIF with 47 49 46 38. File extensions (.png, .jpg) are just labels — they can be wrong. This detector identifies the actual format regardless of the filename.

How to detect image format

  1. 1Drop one or more images (or click to browse).
  2. 2Each file shows its real format, the expected format from its extension, and whether they match.

Frequently Asked Questions

Why does my file extension not match the real format?

File extensions are just labels. Anyone can rename a .jpg to .png — it doesn't change the file contents. This tool reads the first few bytes (magic bytes) of the file to identify the actual format, ignoring the extension.

What are magic bytes?

Magic bytes are fixed byte sequences at the start of a file that identify its format. PNG files start with 89 50 4E 47, JPEG with FF D8 FF, GIF with 47 49 46 38. Every image format has a unique magic byte signature.

What formats does this detect?

PNG, JPEG, GIF, WebP, AVIF, BMP, ICO, HEIC, TIFF, and SVG.

Try Next

EXIF Remover

Remove EXIF, GPS, and other metadata from your photos before sharing. Two modes: precise (lossless JPEG) or full re-encode (any format). 100% local — the photo never leaves your device.

Related Tools

Reference & Guides