Image Format Inspector

Find out what an image file really is from its bytes, read its header field by field, and get a diagnosis: wrong extension, cut-off or damaged file, hidden data, GPS, CMYK, formats browsers will not show, with a link to the tool that fixes each problem.

Analyzer Media & Files Updated Oct 16, 2026
How to Use
  1. Drop any image file on the box or click to browse. A built-in sample PNG is inspected first.
  2. Read the four readouts: the format the bytes prove, the dimensions, the colour layout (bit depth, subsampling) and the verdict.
  3. Go through the diagnosis. Each problem says what is wrong and links to the tool that fixes it, such as the converter for HEIC or the File Doctor for a cut-off file.
  4. Look at the byte map: how much of the file is pixel data, structure, colour profile and metadata. Hover a block for its position and size.
  5. Open Show Work to see each header field with the bytes it came from, and the calculations (JPEG quality, PNG compression ratio, DPI).
File
Presets
Diagnosis
Preview
Format
—
Dimensions
—
Colour
—
Verdict
—

Worked Example

A 640 × 420 PNG. The first eight bytes are 89 50 4E 47 0D 0A 1A 0A, the PNG signature. The IHDR chunk follows: bytes 16–19 are 00 00 02 80 = 640 and bytes 20–23 are 00 00 01 A4 = 420, then bit depth 8 and colour type 6 (RGBA). Uncompressed, every row is a filter byte plus 640 × 4 bytes, so the image is 420 × 2,561 = 1,075,620 bytes; if the IDAT chunks hold 400,000 bytes, deflate has compressed it 2.69 : 1.

A JPEG from a phone. The SOF0 header gives the size and three components with sampling factors Y 2×2 and Cb, Cr 1×1, so colour is stored at half the width and half the height: 4:2:0. If the first value of the luminance table is 3, the IJG standard value 16 scaled for quality 90 matches: s = 200 − 2 × 90 = 20 and ⌊(16 × 20 + 50) ÷ 100⌋ = 3. The inspector checks all 64 values this way for every quality from 1 to 100.

The common mistake: trusting the file name. A file called photo.png that starts FF D8 FF is a JPEG. Converting it "from PNG" in a tool that believes the name fails, and an upload form that checks the extension against the content may reject it. The inspector reads the bytes, reports JPEG and "Wrong file extension", and tells you to rename it to .jpg; nothing else about the file needs changing.

Show Work

Load a file to see each header field and the bytes it came from.

Formulas and Signatures

Signatures
PNG 89 50 4E 47 · JPEG FF D8 FF · GIF 47 49 46 38 · WebP RIFF…WEBP · BMP 42 4D · TIFF 49 49 2A 00 / 4D 4D 00 2A
the first bytes decide the format
PNG raw size
R = H × (1 + ⌈W × bits per pixel ÷ 8⌉)
deflate ratio = R ÷ IDAT bytes
JPEG quality
q = ⌊(T × s + 50) ÷ 100⌋, s = 200 − 2Q (Q ≥ 50) or 5000 ÷ Q
T = IJG standard table; best Q reproduces the file’s table
Subsampling
Y h×v ÷ C h×v: 2×2 → 4:2:0, 2×1 → 4:2:2, 1×1 → 4:4:4
from the SOF sampling factors
PNG DPI
dpi = pixels per metre × 0.0254
pHYs chunk, unit 1; 11,811 px/m = 300 dpi
BMP row
row = ⌈W × bpp ÷ 32⌉ × 4 bytes
rows are padded to 4 bytes

Why Every Format Starts With a Signature

Programs recognise files by a fixed sequence at the start, often called a magic number. The PNG signature, fixed in the 1996 specification, was designed to catch damage in transit: the first byte 0x89 has the high bit set, so a 7-bit channel that strips it is detected; the "PNG" letters identify the format to a person; the carriage return and line feed pair and the lone line feed reveal line-ending conversion; and 0x1A stops the listing on MS-DOS. JPEG files, defined by ITU-T T.81 in 1992, are a stream of two-byte markers starting with FF D8; GIF files begin with the text GIF87a or GIF89a, after the 1987 and 1989 versions of the format.

After the signature, each format describes itself in a header: PNG in its IHDR chunk, JPEG in the start-of-frame segment, GIF in the logical screen descriptor, WebP in its VP8, VP8L or VP8X chunk, BMP in the BITMAPINFOHEADER and TIFF in its first image directory. These headers are small and fixed, which is why an inspector can read the size, depth and colour layout of a picture without decoding a single pixel, and why a file that ends early can be spotted by checking for the end marker every format defines.

About This Tool

This inspector identifies an image file from its bytes, decodes the header of PNG (with a CRC check of every chunk), JPEG (coding, subsampling, quality), GIF (frames, loop, duration), WebP, BMP and TIFF-based RAW, recognises HEIC, AVIF, JPEG XL, PSD, ICO and QOI, and maps the file into pixel data, structure, colour and metadata. It then diagnoses wrong extensions, cut-off and damaged files, data after the end, GPS, CMYK and browser support, and links each problem to the tool that fixes it.

The file is read in your browser and nothing is uploaded. Settings can go in the page address, for example ?sample=cut.

Related tools: Universal Image Converter, File Inspector, and File Doctor.

Frequently Asked Questions

How can a file be a JPEG if its name ends in .png?

The extension is only part of the name; the format is decided by the bytes the program wrote. Every JPEG starts with FF D8 FF and every PNG with 89 50 4E 47 0D 0A 1A 0A. Websites and phones often save a JPEG under the wrong name. Browsers look at the bytes and still show it, but some editors and upload forms refuse a mismatch, so rename it to .jpg.

How is the JPEG quality worked out?

A JPEG stores the quantisation tables it was compressed with. Most encoders (libjpeg and its descendants) scale one standard table by s = 5000 ÷ Q below quality 50 and s = 200 − 2Q above it. The inspector tries every Q from 1 to 100 and reports the one that reproduces the file’s luminance table. If no Q matches exactly, the encoder used its own tables and the number is only the closest match.

What does 4:2:0 subsampling mean?

The picture is stored as brightness (Y) plus two colour channels (Cb, Cr). 4:2:0 keeps the colour at half the width and half the height, so a 4000 × 3000 photo carries colour at 2000 × 1500. Eyes see brightness detail far better than colour detail, which is why almost every camera and website uses it; 4:4:4 keeps full colour and suits text and graphics.

Why does the inspector say my file is cut off?

Each format has a clear end: IEND in PNG, the FF D9 marker in JPEG, the 3B trailer byte in GIF, and the RIFF size in WebP. When the file stops before that point, usually after an interrupted download or copy, the bottom of the picture is missing or grey. The File Doctor can often recover the part that is there.

Is the file uploaded to check it?

No. The bytes are read by JavaScript in your browser, and the preview is decoded by the site’s image engine on your device. Nothing is sent anywhere, so private or unreleased images are safe to inspect.

How do I use the Image Format Inspector?

Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.

Is it free? Does it work without internet?

Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.

Where does my data go?

Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.

Common Use Cases

A file that will not open

Find out that "image.png" is really a cut-off JPEG with no FF D9 end marker, and recover it with the File Doctor.

Check export settings

Confirm a JPEG was saved at quality 85 with 4:2:0 subsampling, or a PNG at 8 bits with no interlace.

Before you share

Spot GPS in EXIF or 2 MB of data hidden after the end of a JPEG, and send the file to the Photo Privacy Cleaner.

Upload rejected

See that a "JPEG" is CMYK or a HEIC with a .jpg name, the two most common reasons a web form refuses a photo.

Last updated: