BatchRAW
BatchRAW / Guides

How to Recover a JPG From a Corrupted RAW File

Published

A card that was pulled out mid-write, a failing hard drive, an interrupted copy — and suddenly Lightroom says your RAW file is damaged or shows a grey rectangle. Before you give up on the shot, know this: the JPEG preview inside the RAW file is often still intact, and you can extract it.

Why the preview can survive

A RAW file is a container with several parts: metadata, one or more embedded JPEG previews, and the raw sensor data. Damage is often localized — a truncated file is missing its end, and in many formats the previews are stored before the large block of sensor data. An editor that needs the full raw data fails, while the preview is perfectly readable.

Step 1: Work on a copy

Never run recovery tools on the only copy. If the file is still on the card, copy it off first, and stop writing to that card.

Step 2: Try extracting the preview

In the browser

  1. Open BatchRAW and drop the damaged files onto it.
  2. Click Start conversion.

BatchRAW looks for every embedded JPEG in the file (it also scans the raw bytes, not just the file's index), checks that each one actually decodes, and uses the largest one that does. A file whose structure is broken can still yield a full-quality JPEG this way. Files that produce nothing are listed as failed.

Convert damaged RAW files to JPG in your browser. BatchRAW is free, needs no install or account, and your files never leave your device. Drop a whole folder and get a ZIP of JPGs back.

Open BatchRAW →

With ExifTool

exiftool -a -b -W %d%f_%t%-c.%s -preview:all damaged.CR2

This dumps every preview it can find. See the ExifTool guide.

Step 3: If no preview comes out

What you get

A recovered preview is the camera's own JPEG rendering. On Canon and Nikon it's usually full resolution; on some other brands it may be smaller (see preview sizes by brand). You can't edit it like a RAW, but you've saved the moment.

Preventing it next time