Image Format Detector
Find out what an image file really is, whatever its name says. The detector reads the file's first bytes (its magic number) to reveal the true format, then shows dimensions, color type, bit depth, transparency and animation, and lets you download the file with the correct extension. Files never leave your device.
Last updated:
These are generated examples: a WebP saved with a .jpg name, a real PNG and a JPG renamed to .png. Add your own files and they disappear.
How to use the Image Format Detector
- Add your files by dropping them in the box, pasting, or clicking Choose files. Three examples are shown until you add your own.
- Read the verdict. Green means the extension matches the real format; orange means it does not.
- Check the details: real format, MIME type, dimensions, bit depth, transparency, animation and metadata.
- Fix the extension with Download as .ext, or press Download fixed files to get every corrected file in one ZIP.
- Copy the report if you need to share the results.
Image file signatures (magic numbers)
A file signature is a short, fixed byte pattern at the start of a file that identifies its format. Unlike the extension, it is part of the data itself, so it cannot be changed by renaming.
| Format | First bytes (hex) | As text | Extensions |
|---|---|---|---|
| JPEG | FF D8 FF | ÿØÿ | .jpg .jpeg .jfif |
| PNG / APNG | 89 50 4E 47 0D 0A 1A 0A | ‰PNG | .png .apng |
| GIF | 47 49 46 38 37/39 61 | GIF87a / GIF89a | .gif |
| WebP | 52 49 46 46 xx xx xx xx 57 45 42 50 | RIFF....WEBP | .webp |
| AVIF | xx xx xx xx 66 74 79 70 61 76 69 66 | ....ftypavif | .avif |
| HEIC | xx xx xx xx 66 74 79 70 68 65 69 63 | ....ftypheic (or mif1) | .heic .heif |
| JPEG XL | FF 0A, or 00 00 00 0C 4A 58 4C 20 | ÿ. or ....JXL | .jxl |
| BMP | 42 4D | BM | .bmp .dib |
| TIFF | 49 49 2A 00 or 4D 4D 00 2A | II*. or MM.* | .tif .tiff (.dng .cr2 .nef) |
| ICO | 00 00 01 00 | .... | .ico |
| Photoshop | 38 42 50 53 | 8BPS | .psd .psb |
| QOI | 71 6F 69 66 | qoif | .qoi |
| SVG | text starting with <?xml or <svg | <svg | .svg |
Why extensions and real formats get mixed up
- Modern formats behind old names: image CDNs often deliver WebP or AVIF to browsers that support them while keeping .jpg or .png in the address.
- Phone photos: iPhones store photos as HEIC. Some transfer apps rename them to .jpg without converting them.
- Manual renaming: renaming photo.png to photo.jpg does not convert anything, but people often expect it to.
- Failed downloads: a broken or protected link may save an HTML error page with the image's name, which no image viewer can open.
Reading the details
- Chroma subsampling (JPEG, AVIF, HEIC): 4:2:0 stores color at a quarter of the resolution of brightness, which is invisible in photos but can blur thin colored text. 4:4:4 keeps full color detail.
- Bit depth above 8 means the file can hold smoother gradients or HDR. Many web browsers show it at 8 bits.
- Progressive JPEG and interlaced PNG load as a blurry preview first, then sharpen.
- Need the camera, date and GPS details instead? Use the Image Metadata Viewer. To change the format, try the Image Converter.
Frequently asked questions
How can I tell what format an image really is?
Every common image format begins with a fixed signature called a magic number: PNG files start with the bytes 89 50 4E 47, JPEG with FF D8 FF, GIF with the text GIF8, and WebP with RIFF followed by WEBP. This tool reads those first bytes instead of trusting the file name, so it reports the true format even when the extension is wrong.
Why is my .jpg file actually a WebP?
Many websites serve WebP or AVIF images to save bandwidth, even when the address ends in .jpg. When you save the picture, the browser keeps the original name, so you get a WebP inside a .jpg name. Some programs then refuse to open it. Saving it with the .webp extension, or converting it with WebP to JPG, solves the problem.
Does changing the extension convert the image?
No. Renaming only changes the label; the bytes inside stay the same. The Download as button here gives the file the extension that matches its real contents, which helps programs open it. To actually change the format, use a converter such as WebP to JPG or HEIC to JPG.
What does bits per pixel mean in the results?
Bit depth is how much data each pixel stores in the format, for example 24 bits for 8-bit RGB or 32 bits for RGBA. The separate bits per pixel figure next to the file size is the compressed size divided by the pixel count, which shows how efficiently the file is compressed: a typical JPEG photo lands between 1 and 4 bits per pixel.
Why does my image open as a web page or fail to load?
If the detector says the file is HTML, the download did not contain an image at all. The server returned an error page, a login page or a redirect, and it was saved with the image name. Go back to the original link and save the picture itself.
Can it detect HEIC, AVIF and JPEG XL?
Yes. HEIC and AVIF are recognized from the ftyp box and its brands, and their width, height, bit depth, chroma format and alpha are read from the image properties. JPEG XL is recognized in both its bare codestream and container forms, with the dimensions decoded from the size header.
Are my files uploaded?
No. The files are read with JavaScript in your browser and never sent anywhere. Only the first part of each file needs to be examined, so even very large files are checked instantly.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.