JPEG or PNG cut off, grey at the bottom, or "premature end of JPEG file"

Last reviewed 2026-09-19

Images are stored top to bottom. When a file is cut off during a copy, download or card failure, everything before the cut is still there, but the file is missing its end marker so many programs refuse it or show the missing part as grey or black.

Messages you might see

  • “Premature end of JPEG file”
  • “Corrupt JPEG data: premature end of data segment”
  • “The image cannot be displayed because it contains errors”

Why it happens

  • The card was removed, or the transfer interrupted, while the photo was being copied.
  • The download stopped early or the disk ran out of space.
  • A failing memory card or USB drive damaged the file.

Try this first (free, no tool needed)

  1. Copy the photo again from the original card or phone with a different cable or card reader.
  2. Try another viewer (a browser, IrfanView, GIMP). Some show a partly damaged image that others reject.
  3. Check cloud backups, the phone's gallery trash and any thumbnail or preview copy.
  4. If many photos are affected, stop using the card and image it first.

If that didn't work

These tools run in your browser. Your file is read and repaired on your own device and is never uploaded.

Corrupted/Truncated Image Repair

Adds the missing end marker, removes cut-off and empty trailing bytes and shows everything that was saved. For PNG it also fixes wrong chunk checksums and recovers as much pixel data as survives. Pixels that were never saved cannot be brought back: the missing part shows as grey (JPEG) or black / transparent (PNG).

Open Corrupted/Truncated Image Repair

Common questions

Can it restore the missing bottom of the photo?

No. Nothing can recreate data that was never written. It gives you the part that exists, in a file every program can open.

Is my file uploaded anywhere?

No. The tool runs as a program inside your own browser, so the file is read and repaired on your device and never sent to a server.

Related guides