Skip to content
Bytevive

How to fix corrupted photos: what can be saved, and how

Won't open, half gray, shifted colors, or missing from the card: how to tell what's wrong with a corrupted photo and fix it while losing as little as possible.

By the Bytevive team8 min read

A laptop showing a partly gray, damaged photo next to printed photos, a camera, and a memory card

A photo that won’t open, opens half gray, or shows strange colors and stripes looks lost. Often it isn’t. A lot of “corrupted” photos are perfectly good pictures in a damaged wrapper, and some aren’t damaged at all: the app just can’t read the format.

This guide sorts out which case you have and gives the fix for each, starting with the ones that get the whole picture back and ending with what to do when only part of it survived. It also covers the popular advice that quietly makes things worse.

First: copy, then try a different viewer

  • Copy the photos somewhere safe and work on the copies. If the originals are still on the memory card or phone, copy them again; a bad transfer is one of the most common causes, as our guide to photos damaged after an SD card copy explains.
  • Drag the photo into a browser window. Chrome, Edge, and Firefox use their own image decoders. If the photo displays there, the file is fine and the app you tried is the problem.
  • Check the size. A 0 KB file is empty. A file much smaller than its neighbors was probably cut off.

What kind of broken is it?

What you seeWhat’s going onWhere to go
“It looks like we don’t support this file format”Wrong extension, unsupported format, or a damaged startOur guide to that message
Top part fine, the rest flat grayThe file was cut off partwayFixing a half-gray JPEG
Colors shift or rows slide sideways from one point onBits damaged inside the compressed picture dataShifted colors and rows
The thumbnail looks fine but the photo won’t openThe small preview inside survived; the main image didn’tExtract the embedded preview
iPhone .heic photos won’t open on WindowsMissing format support, not damageHEIC on Windows
Camera RAW files (.cr3, .nef, .arw) won’t openUsually an outdated RAW converter, sometimes damageUpdate the camera maker’s software or your editor, then try again
Photos are missing or the card says it needs formattingDeleted files or a damaged file system, not damaged photosRecover from the card

Fix the wrapper: repairs that lose nothing

A JPEG starts with a fixed marker and ends with another, as defined in the JPEG standard. A PNG is a chain of blocks, each with a checksum that viewers verify, as the PNG specification requires. Small faults in that structure make apps reject the whole file even when every pixel is there:

  • Unrelated data in front of the picture, left by a recovery tool or a messaging app
  • A missing end marker after an interrupted save
  • A PNG block with a wrong checksum
  • The wrong extension, such as a PNG named .jpg

Bytevive’s photo repair fixes exactly these, in your browser:

  1. Open Photo Repair and sign in with a free account.
  2. Drop in the JPEG, PNG, GIF, WebP, or BMP (up to 256 MB). Nothing is uploaded.
  3. Bytevive lists what it found, removes leading junk, adds a missing end marker, rebuilds PNG checksums, and gives the file its correct extension.
  4. Save the copy. It isn’t re-compressed, so every surviving pixel is exactly as it was. If part of the photo never made it into the file, your browser shows what’s left and estimates how much is still there, though stricter apps may still refuse a cut-off file.

If the photo is actually healthy, Bytevive says “This photo opens normally” and leaves it alone, which tells you to look at the app instead. To see how JPEG start and end markers work up close, try our interactive JPEG marker walkthrough.

Shifted colors and rows

JPEG picture data is one long compressed stream. A few damaged bits throw the decoder off from that point on, so everything below shifts color, slides sideways, or turns to noise. The information is often still there, just decoded wrongly.

Fixing it is careful manual work: specialist editors such as the free JPEG Visual Repair Tool let you remove the damaged blocks so the rows line up again and correct the color level of each block. It’s worth the effort for one irreplaceable photo; for a whole folder, check for a better copy or the embedded preview first.

Rescue the embedded preview

Cameras and phones store a small preview inside most photos, and RAW files usually carry a large, often full-size JPEG. If the main image is lost but the thumbnail looks right in File Explorer or on the camera, that preview can be pulled out. With ExifTool:

  • exiftool -b -PreviewImage photo.jpg > preview.jpg for the larger preview, if there is one
  • exiftool -b -ThumbnailImage photo.jpg > thumb.jpg for the small thumbnail
  • exiftool -b -JpgFromRaw photo.nef > full.jpg for the full-size JPEG in many RAW files

A small thumbnail won’t print well, but it’s far better than nothing for a photo you can’t retake.

When the photos are on a card that won’t cooperate

If photos are missing, were deleted, or the card asks to be formatted, the files themselves may be fine; the list that points to them is damaged. Don’t format the card or take new pictures on it. PhotoRec, free and open source, ignores the file system and searches the card for picture data directly. Save what it finds to a different drive, then run anything that comes back damaged through the wrapper repair above.

When a photo can’t be fixed

  • The data was never saved. The gray part of a cut-off photo isn’t hidden; it isn’t in the file.
  • The file is empty or overwritten. A 0 KB file, or one full of zeros or another file’s data, holds nothing to repair. As DiskTuna shows, recovery tools sometimes produce files like this.
  • Heavy damage throughout. When errors repeat every few rows, even manual repair rarely gets a usable picture. The embedded preview is the realistic goal.

How to avoid it next time

  • Wait for copies to finish and eject cards and drives properly before removing them.
  • Format memory cards in the camera, not on a computer, and replace cards that start throwing errors.
  • Keep a second copy of anything important, ideally in a different place.
  • Open a few photos from each import before you delete them from the card.

The bottom line

Copy the photos, re-copy them from the source if you can, and try a browser before assuming damage. If the wrapper is broken, repair it with Bytevive, free and without uploading or re-compressing. If the picture data itself is damaged, try the embedded preview, a careful manual fix for the ones that matter, and PhotoRec when the card is the problem.

Frequently asked questions

Can corrupted photos be fixed?
Often, yes. Many “corrupted” photos are intact pictures inside a damaged wrapper: junk in front of the image, a missing end marker, a wrong checksum, or the wrong extension. Those can be fixed without losing a pixel. Picture data that was never saved, or was overwritten, can't be brought back by any tool.
Why is half my photo gray?
The file was cut off partway, usually during a copy or because the card was removed too soon. JPEG decoders fill the missing part with flat gray. The top part is genuine and can be saved; the gray part was never in the file.
Does opening a corrupted photo in Paint and saving it fix it?
Only in the sense that you get a file that opens. Paint saves what it managed to display, damage included, and re-compresses it, so the result is a copy of the broken picture at lower quality. Keep the original and try a structural repair first.
Can I recover photos from an SD card that won't open?
If the card is readable but the photos are missing or deleted, PhotoRec can search the card for picture data. If the card isn't recognized at all, stop using it and consider a professional recovery service, because repeated attempts can make things worse.
Which photo formats does Bytevive repair?
JPEG, PNG, GIF, WebP, and BMP, up to 256 MB per file, free with a free account, in your browser and without uploading. HEIC and camera RAW files aren't supported yet. If a photo is actually fine, Bytevive says so rather than changing it.

Sources

Every claim, error message, price, and limit cited above comes from these pages, checked on November 28, 2026. If one has changed, tell us at support@bytevive.com and we’ll update the article.

  1. ITU-T T.81: the JPEG standard (marker codes)
  2. libjpeg-turbo source: jdhuff.c ("uniform gray" fill)
  3. W3C: PNG specification (chunks and CRC)
  4. Library of Congress: JPEG File Interchange Format (magic numbers)
  5. ExifTool documentation (extracting embedded thumbnail and preview images)
  6. CGSecurity: PhotoRec, digital picture and file recovery
  7. JPEG Visual Repair Tool on GitHub
  8. DiskTuna: The corrupt JPEGs that weren't corrupt

Photo won't open? Find out how much survived.

Free account, photos up to 256 MB. The picture never leaves your device.

Repair a photo, free

Other free tools: video, PDF, photo, Office, ZIP, and audio repair.