Image Format Detector

Detect the true format of any image file by reading its magic bytes. See format, MIME type, dimensions, file size, transparency, and color depth.

Free online file converter tool. Works in Chrome Firefox Safari Edge Opera and other modern browsers on Windows macOS Linux Android and iOS. No software installation required. Browser-side processing keeps your file local when supported. Completely free to use with no account needed.

Image Format Detector

Detect the true format of any image by reading its magic bytes. See format, MIME type, dimensions, transparency, and color depth. Free and private.

Drop your image here

or click to browse files

Supports JPEG, PNG, GIF, WebP, BMP, TIFF, HEIC, HEIF, AVIF, SVG and more

Image Format Detector Features

Accurate format detection from binary file headers, not just file extensions.

HEX
Magic Byte Detection

Reads the binary header of your file to identify the true format regardless of what the file extension says.

DIM
Dimensions and Metadata

Loads the image to report exact pixel dimensions, transparency support, and color depth information.

LOCK
Fully Private

Only the first 32 bytes are read for format detection. The full file is processed locally with no server upload.

How to Detect an Image Format

  1. Add your image file

    Drag any image onto the drop area or click Choose Image to pick a file. Files such as JPEG, PNG, GIF, WebP, BMP, TIFF, HEIC, HEIF, AVIF, PSD, and SVG are all recognized from their binary signature, not the file name.

  2. Let the header read run in your browser

    The tool reads only the first 32 bytes of the file with the FileReader API and compares them against known magic byte signatures. It then loads the image to measure pixel dimensions. Everything happens on your device, so nothing is uploaded to a server.

  3. Review the detected details

    Read the true format, MIME type, canonical file extension, file size, dimensions, transparency support, and color depth. If the bytes do not match any signature the format shows as Unknown, while size and any readable dimensions are still listed.

Magic Byte Signatures by Format

Detection is based on the fixed bytes at the start of each file. The table below lists the leading signature this tool matches and how transparency is reported for each format.

FormatLeading bytes (hex)MIME typeTransparency
JPEGFF D8 FFimage/jpegNo (reported as 24-bit, no alpha)
PNG89 50 4E 47image/pngRead from IHDR color type (4 or 6 = yes)
GIF47 49 46image/gifYes, via transparent color index
WebP52 49 46 46 ... 57 45 42 50image/webpPossible, depends on the variant
HEIC / AVIFftyp box brand at bytes 8-11image/heic, image/avifPossible, depends on the file
SVG3C 73 76 67 or 3C 3F 78 6Dimage/svg+xmlYes (vector, alpha supported)

When This Tool Helps Most

A renamed file will not open

If an app rejects image.jpg or shows a broken thumbnail, the real format may differ from the extension. Reading the magic bytes tells you whether the content is actually PNG, WebP, or something else so you can rename or convert it correctly.

Identifying HEIC on Windows

When a browser cannot preview a HEIC file, header detection still works because it reads the ftyp box brand without decoding the image. The format badge reports HEIC, HEIF, or AVIF even if dimensions show as unavailable.

Checking transparency before editing

For PNG the tool reads the IHDR color type to confirm a real alpha channel, and it flags GIF, WebP, TIFF, and HEIC cases where transparency is possible. Useful before placing an image over a colored background.

Confirming color depth

PNG depth is read precisely from the header. JPEG is reported as 24-bit, and WebP, HEIC, TIFF, and AVIF show a typical range. Helpful when you need to know whether a file is 8-bit or HDR-capable before processing.

Common Problems and Fixes

Format shows as Unknown

The first bytes did not match any known signature. This happens with rare or proprietary formats, truncated downloads, or files that are not images at all. The file name, size, and any dimensions the browser can read are still displayed for reference.

Dimensions say could not be determined

The format was identified from its header, but your browser could not decode the pixels to measure width and height. This is common for HEIC, HEIF, TIFF, or PSD files. The detected format and MIME type remain accurate even without dimensions.

Transparency reads as Possible

For WebP, HEIC, HEIF, AVIF, and TIFF the presence of an alpha channel depends on the specific file and is not fixed by the format. The tool reports Possible rather than guessing. Only PNG and GIF return a definite Yes or No here.

Detected format differs from the extension

That is the tool working as intended. The extension is just part of the file name and can be changed freely, while the magic bytes reflect the real content. Trust the detected format and rename or convert the file to match if needed.

References

  1. Image file type and format guide - MDN Web Docs, Mozilla
  2. List of file signatures (magic numbers) - overview
  3. PNG file signature - W3C
  4. ITU-T T.81: JPEG marker structure - ITU
  5. WebP RIFF container - Google Developers
  6. FileReader.readAsArrayBuffer() - MDN Web Docs, Mozilla
  7. DataView - MDN Web Docs, Mozilla
  8. Image media types registry - IANA