Home › Image Tools › Image Format Detector

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:

Advertisement
Advertisement

How to use the Image Format Detector

  1. Add your files by dropping them in the box, pasting, or clicking Choose files. Three examples are shown until you add your own.
  2. Read the verdict. Green means the extension matches the real format; orange means it does not.
  3. Check the details: real format, MIME type, dimensions, bit depth, transparency, animation and metadata.
  4. Fix the extension with Download as .ext, or press Download fixed files to get every corrected file in one ZIP.
  5. 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.

FormatFirst bytes (hex)As textExtensions
JPEGFF D8 FFÿØÿ.jpg .jpeg .jfif
PNG / APNG89 50 4E 47 0D 0A 1A 0A‰PNG.png .apng
GIF47 49 46 38 37/39 61GIF87a / GIF89a.gif
WebP52 49 46 46 xx xx xx xx 57 45 42 50RIFF....WEBP.webp
AVIFxx xx xx xx 66 74 79 70 61 76 69 66....ftypavif.avif
HEICxx xx xx xx 66 74 79 70 68 65 69 63....ftypheic (or mif1).heic .heif
JPEG XLFF 0A, or 00 00 00 0C 4A 58 4C 20ÿ. or ....JXL.jxl
BMP42 4DBM.bmp .dib
TIFF49 49 2A 00 or 4D 4D 00 2AII*. or MM.*.tif .tiff (.dng .cr2 .nef)
ICO00 00 01 00.....ico
Photoshop38 42 50 538BPS.psd .psb
QOI71 6F 69 66qoif.qoi
SVGtext 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.

Related tools

Image Metadata ViewerSee a photo's EXIF data: camera, lens, exposure, date and GPS location, then strip it in one click.Image ConverterConvert images between JPG, PNG, WEBP, AVIF, BMP, GIF and ICO in batches, right in your browser.WEBP to JPGConvert WEBP images to JPG in bulk.HEIC to JPGConvert iPhone HEIC photos to JPG.Image CompressorShrink images to a target size like 100 KB.Image ResizerResize images to any size without losing quality.Compress Image to 20KBShrink any photo to under 20KB (or any target size).Compress Image to 100KBShrink any photo to under 100KB automatically, with the best quality that fits.Compress JPEG to 50KBShrink photos to under 50KB for forms, passports and exams.Image CropperCrop images, including circle crops for profile pictures.Rotate & Flip ImageRotate images by any angle or mirror them, one or many at once.Collage MakerCombine photos into a grid collage.Aspect Ratio CalculatorCalculate image sizes for 16:9, 4:3 and any ratio.Image Border AdderAdd a border, rounded corners, matte and shadow to a photo onlineImage SplitterSplit an image into a rows × columns grid of tiles and download them one by one or as a ZIP.Image CombinerCombine images side by side, stacked or in a grid, with spacing, background color and alignment.Image UpscalerEnlarge images 2×, 3× or 4× with Lanczos-3 or bicubic resampling and optional sharpening.Image DPI ChangerChange the DPI of JPG and PNG images without re-encoding, and see the print size.Pixel Art MakerDraw pixel art on an 8 to 64 px grid with palettes, fill and mirror, then export PNG or SVG.Social Media Image ResizerResize photos for Instagram, Facebook, X, LinkedIn, YouTube, TikTok and Pinterest in one go.Image Diff CheckerCompare two images and highlight every changed pixel, with % difference and a swipe slider.Emoji to ImageTurn any emoji into a PNG image from 64 to 1024 px, transparent or on a color, in batch.Text to ImageTurn text into a PNG image with your font, size, colors, padding, alignment and wrapping.SVG OptimizerMinify SVG files: strip metadata, comments and editor junk, round numbers, compare sizes.Compress Image to 200KBShrink any photo to under 200KB automatically, with the best quality that fits.Crop GIFCrop an animated GIF with a draggable box or aspect ratio presets, keeping every frame.Crop Image into ShapeCrop a photo into a heart, star, hexagon, circle, speech bubble or custom SVG shape as a PNG.Drawing Grid MakerPut a numbered grid on a reference photo to copy it by hand. Print it or save as PNG or PDF.Resize GIFResize an animated GIF by width, height or percent, skip frames and compare file sizes.Square Image Maker (No Crop)Make any photo square, 4:5 or 9:16 without cropping, with a color, blur or gradient fill.Text Behind ImagePut text behind the subject of a photo: AI cut-out, fonts, colors, rotation and PNG export.Bulk Image ResizerResize many images at once by width, height, percent or longest side and download a ZIP.JPG to WordTurn photos and scans into an editable Word document with OCR. Batch images, 30+ languages.PNG CompressorShrink PNG files up to 80% with smart color reduction that keeps transparency. Batch + ZIP.Photo Measurement ToolMeasure distances, areas and angles on a photo using a card or ruler in the picture for scale.Pupillary Distance MeasurementMeasure your PD in mm from a webcam or photo with a card for scale, single and dual PD.Brighten ImageBrighten dark photos with auto exposure, shadows lift and highlight protection. Batch, no upload.Change Image Aspect RatioConvert photos to 1:1, 4:5, 16:9, 9:16, 3:2 or any ratio by crop, color padding or blur fill.Auto Face CropDetect faces and crop centered headshots at any ratio and padding, in batch.Content-Aware Image ResizeResize images with seam carving to keep people and objects intact; protect or remove areas.Scanned Photo SplitterSplit several photos from one flatbed scan: auto-detect, straighten and crop each, then ZIP.Crop Photo for PrintCrop photos to 4x6, 5x7, 8x10, 11x14 or A4 print ratios with a DPI quality check, then export.Long Screenshot StitcherStitch scrolling screenshots into one long image with automatic overlap detection.Image to Minecraft Pixel ArtConvert any image into Minecraft block pixel art with block counts, stacks and a row-by-row build guide.Pixel Art UpscalerUpscale pixel art and sprites crisply with nearest neighbor, Scale2x/3x or xBR, keeping transparency.Resize Image in CM and InchesResize a photo to an exact print size in cm, mm or inches at any DPI. JPG, PNG or PDF.Online Screenshot ToolCapture your screen, a window or a tab, then crop, annotate and copy or save it as PNG.Trim Image WhitespaceAuto-crop white borders or transparent padding from images with tolerance and margin. Batch.Fix Image OrientationRotate sideways photos upright for good by applying the EXIF orientation to the pixels, in batch.Increase Image Size in KBMake a photo's file size bigger (e.g. 50 KB or more) to pass minimum upload limits, with no visible change.Megapixel CalculatorTurn width × height into megapixels, aspect ratio and max print size, or MP back to pixels.Volleyball Rotation ToolEnter 6 players and a 5-1, 6-2 or 4-2 system to see all rotations and serve receive on a court.
See all 49 Resize, Crop & Compress →