filerepair
All Tools ▾
Live Preview · Private & Free

Repair Corrupted PNG & JPEG Images

Fix broken image headers, recalculate invalid PNG chunk CRCs, strip malformed JPEG EXIF blocks, and restore missing EOF markers.

Drop your PNG & JPEG file here
Drag & drop anywhere or press⌘V·100% on-device · never leaves your browser
Try a sample:

Common Issues Handled

  • "PNG: invalid signature / CRC error in chunk / unexpected end of file (missing IEND)"
  • "JPEG: Not a JPEG file (starts with leading garbage) or missing EOI marker (FF D9)"
  • "Image viewer refuses to open photo due to corrupted EXIF metadata"

How It Works

  1. PNG: restores the 8-byte PNG signature, walks chunks, recomputes CRC32s, and appends IEND.
  2. JPEG: strips leading garbage before FF D8, optionally removes malformed EXIF segments, and appends FF D9.
  3. Renders the repaired image directly in your browser so you can verify it immediately.

Exact Error Codes & System Messages Fixed

Windows Photos / macOS Preview
It looks like we don't support this file format / The file could not be opened because it is damaged
Adobe Photoshop
Could not complete your request because a SOF0 / DQT / JPEG marker is missing or unknown
libpng / Browsers
libpng error: Not a PNG file / CRC error in chunk IHDR or IDAT / Read Error: missing IEND
Camera SD Card Recovery
Recovered .jpg starts with leading junk bytes before FF D8 FF or lacks trailing FF D9 EOI

PNG Chunk CRC32 Checksums vs. JPEG Marker Framing

PNG images require an exact 8-byte signature (89 50 4E 47 0D 0A 1A 0A), followed by length-prefixed chunks (IHDR, IDAT, IEND) where every chunk ends in a 4-byte CRC32 checksum. A single flipped bit in metadata or a truncated download missing IEND causes Photoshop and browsers to reject the entire image.

JPEG images are framed by Start-Of-Image (FF D8) and End-Of-Image (FF D9) markers. File recovery tools often prepend junk bytes before FF D8 or leave corrupted APP1 EXIF headers that crash image viewers. FileRepair trims leading garbage, optionally strips broken EXIF segments, recalculates PNG CRCs, and renders a live preview.

What Can Be Repaired

  • Damaged 8-byte PNG signatures, invalid chunk CRC32s, and missing IEND trailers
  • Leading garbage bytes before JPEG FF D8 SOI and missing FF D9 EOI markers
  • Malformed EXIF/APP1 metadata blocks preventing photo viewers from opening JPEGs

Honest Limitations

  • Severely scrambled Huffman entropy scans inside JPEG pixel data
  • Images whose pixel data was overwritten with zeros (all grey/blank)

Frequently Asked Questions

Can this restore a completely grey/zeroed photo?

If the underlying pixel bytes were overwritten with zeros, no tool can invent missing pixels. Our instant zero-byte check tells you immediately if pixel data still exists.

Why does my repaired PNG or JPEG still show grey at the bottom?

If a file transfer was cut off at 60%, the bottom 40% of pixel bytes never reached your disk. FileRepair restores valid headers and trailers so the surviving 60% opens cleanly in any editor.

Related File Tools