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
Image Format Detector Features
Accurate format detection from binary file headers, not just file extensions.
Reads the binary header of your file to identify the true format regardless of what the file extension says.
Loads the image to report exact pixel dimensions, transparency support, and color depth information.
Only the first 32 bytes are read for format detection. The full file is processed locally with no server upload.
Key Takeaways
- This tool identifies an image's true format from its binary magic bytes, not its file extension, so it correctly spots a PNG or WebP that was wrongly renamed to.jpg.
- All analysis runs in your browser using the FileReader API to read just the first 32 bytes, so your imageis processed on your device.
- Transparency is reported as a definite Yes or No only for PNG and GIF, while WebP, HEIC, HEIF, AVIF, and TIFF show Possible because alpha depends on the specific file.
- Header detection still identifies HEIC, HEIF, TIFF, and PSD files even when your browser cannot decode the pixels, in which case the format and MIME type stay accurate but dimensions may show as unavailable.
How to Detect an Image Format
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.
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.
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.
| Format | Leading bytes (hex) | MIME type | Transparency |
|---|---|---|---|
| JPEG | FF D8 FF | image/jpeg | No (reported as 24-bit, no alpha) |
| PNG | 89 50 4E 47 | image/png | Read from IHDR color type (4 or 6 = yes) |
| GIF | 47 49 46 | image/gif | Yes, via transparent color index |
| WebP | 52 49 46 46 ... 57 45 42 50 | image/webp | Possible, depends on the variant |
| HEIC / AVIF | ftyp box brand at bytes 8-11 | image/heic, image/avif | Possible, depends on the file |
| SVG | 3C 73 76 67 or 3C 3F 78 6D | image/svg+xml | Yes (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.
What Is Image Format Detection?
Every image file format has a unique signature in its first few bytes, called magic bytes or a file header. This tool reads that signature to determine the true format of your file, independent of the filename or extension. It also loads the image to measure dimensions and detect transparency.
Frequently Asked Questions
Why does true format detection matter?
File extensions can be misleading. A file named image.jpg might actually contain WebP or PNG data if it was renamed.
Applications that rely on extensions may fail to open or process such files correctly.
Reading the binary header gives a definitive answer about the actual format.
What are magic bytes exactly?
Magic bytes are a fixed sequence of bytes at the beginning of a file that serve as a format identifier.
For example, JPEG files always start with FF D8 FF. PNG files start with 89 50 4E 47 0D 0A 1A 0A.
Operating systems and applications use these signatures to identify file types reliably.
How is PNG transparency detected specifically?
PNG files contain an IHDR chunk starting at byte 8 of the file. Byte 25 of the file holds the color type value.
Color type 4 means grayscale with alpha channel. Color type 6 means RGBA, full color with alpha.
Only those two types support per-pixel transparency. Types 0, 2, and 3 do not have an alpha channel.
Can I detect HEIC format on Windows where it cannot be previewed?
Yes. The magic byte detection reads only the binary header and does not require the browser to decode the image.
The format badge will show HEIC or HEIF based on the ftyp box brand in the file header.
Dimensions may show as unavailable if the browser cannot decode the HEIC image, but the format is still identified correctly.
What is the ftyp box in HEIC and AVIF files?
HEIC, HEIF, and AVIF all use the ISO Base Media File Format container. The first box in the file is the ftyp box.
The ftyp box contains a four-character brand code such as heic, mif1, or avif that identifies the specific format variant.
This tool reads bytes 8-11 of the file to extract this brand code for accurate identification.
Is color depth information accurate for all formats?
For PNG, color depth is read precisely from the IHDR chunk which contains bit depth and color type fields.
For JPEG, 24-bit is reported as standard since JPEG virtually always uses 8 bits per channel without alpha.
For WebP, HEIC, TIFF, and AVIF, the reported value is a typical range because the exact depth requires full file parsing.
What if the format shows as Unknown?
If the magic bytes do not match any known signature, the format is listed as Unknown.
This can happen with rare formats, corrupted files, or files that are not images at all.
The file name, size, and any dimensions the browser can load are still shown.
Does this tool work on mobile devices?
Yes. The FileReader API and Image API are available in all modern mobile browsers.
The interface is fully responsive and works on phones and tablets.
You can analyze images from your camera roll or file storage directly.
Sources and References
Format and tool details on this page are based on the official specifications and documentation below.
- JPEG standard (ISO/IEC 10918)- JPEG Committee
- JPEG image type- MDN Web Docs
- PNG Specification (Third Edition)- W3C
- WebP- Google Developers
- Graphics Interchange Format (GIF)- Library of Congress