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 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 see | What’s going on | Where to go |
|---|---|---|
| “It looks like we don’t support this file format” | Wrong extension, unsupported format, or a damaged start | Our guide to that message |
| Top part fine, the rest flat gray | The file was cut off partway | Fixing a half-gray JPEG |
| Colors shift or rows slide sideways from one point on | Bits damaged inside the compressed picture data | Shifted colors and rows |
| The thumbnail looks fine but the photo won’t open | The small preview inside survived; the main image didn’t | Extract the embedded preview |
| iPhone .heic photos won’t open on Windows | Missing format support, not damage | HEIC on Windows |
| Camera RAW files (.cr3, .nef, .arw) won’t open | Usually an outdated RAW converter, sometimes damage | Update the camera maker’s software or your editor, then try again |
| Photos are missing or the card says it needs formatting | Deleted files or a damaged file system, not damaged photos | Recover 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:
- Open Photo Repair and sign in with a free account.
- Drop in the JPEG, PNG, GIF, WebP, or BMP (up to 256 MB). Nothing is uploaded.
- Bytevive lists what it found, removes leading junk, adds a missing end marker, rebuilds PNG checksums, and gives the file its correct extension.
- 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.jpgfor the larger preview, if there is oneexiftool -b -ThumbnailImage photo.jpg > thumb.jpgfor the small thumbnailexiftool -b -JpgFromRaw photo.nef > full.jpgfor 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?
Why is half my photo gray?
Does opening a corrupted photo in Paint and saving it fix it?
Can I recover photos from an SD card that won't open?
Which photo formats does Bytevive repair?
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.
- ITU-T T.81: the JPEG standard (marker codes)
- libjpeg-turbo source: jdhuff.c ("uniform gray" fill)
- W3C: PNG specification (chunks and CRC)
- Library of Congress: JPEG File Interchange Format (magic numbers)
- ExifTool documentation (extracting embedded thumbnail and preview images)
- CGSecurity: PhotoRec, digital picture and file recovery
- JPEG Visual Repair Tool on GitHub
- DiskTuna: The corrupt JPEGs that weren't corrupt


