JpegDigger – extract JPEG from corrupt RAW files (.NEF, .CR2 etc.)

JpegDigger is a simple freeware utility to extract JPEG files from corrupt RAW, JPG and CHK files. When cameras are set to capture the RAW format, most manufacturers embed a JPEG image in the RAW file for use when displaying the image on the camera’s LCD or in a browser. In most cases, the embedded JPEG’s quality setting is medium or better. The embedded JPEG is usually smaller than the native resolution of the camera and is developed using the camera’s image settings (white balance, style, exposure) in effect at the time the image was shot.

Now available! JPEG Recovery LAB – The ultimate photo recovery software for memory cards (JPEG, CR2, NEF).

JpegDigger extracts JPG from corrupt RAW filesWhat is JpegDigger?

There are other tools available that extract embedded JPG files from RAW, JPG and .CHK files. What makes JpegDigger different is that it can process corrupt RAW files too. JpegDigger is kind of a ‘brute force’ tool. Without relying on the internal structures of RAW files it will examine the file for JPEG headers. It does not decode the RAW files. Because it does not rely on internal structures it can be used to find embedded JPEGs in and extract JPEG files from corrupt RAW files. Tools as these are also called ‘carvers’.

To support the different proprietary RAW image file formats it uses several JPEG signatures (magic numbers). I determined those manually examining the different RAW files using a hex editor. Once it finds JPEG data, it opens a file and dumps the binary data to this file and saves it with a JPG extension.

Video of JpegDigger in action ..

While chances of ‘recovery’ may appear to be good if a preview is shown (in the OS or on-camera), also when no preview is shown you should give JpegDigger a shot. No preview does not imply there is no JPEG present inside the RAW file. If the file structure is corrupt Windows or your software simply can not parse the file and therefor can not show a preview.

Please note that your RAW files may appear to be corrupt if the RAW software you’re using is too old (meaning too old to handle a newer RAW file format). Always make sure to use the latest version of your RAW file processing software before assuming a file is corrupt.


Click me to verify

Tested by Softpedia – 100% clean

[SHA256 (of exe): fa2b515b1136b1fb3dbc88c658b047c1f66fd8b9390fc1921f645f3e44fb239b]

With every update I make Windows (SmartScreen) itself and certain virus scanners will see JpegDigger as a new program they do not recognize. Possibly they will prompt that this program may not be safe etc.. However JpegDigger is free of viruses, malware or other crapware. It’s perfectly safe to run.

SmartScreen warning. Simply click ‘More info’ and then ‘Run anyway’.

File is a standalone EXE. No Setup.

JPEG Repair

Supported RAW files

Brand Extension
Nikon .NEF
Canon .CR2, CRW
Olympus .ORF
Sony .ARW
Samsung .SRW
Pentax .PEF
Leica, Android? .DNG
Hasselblad .3FR
Fuji .RAF
Lumix .RW2

If the format your camera shoots isn’t listed here you can email me an intact file. I will examine the file and if possible add support for it.

Please note that there is no RAW image file format specification that for example determines that a RAW image file embeds JPEG data. It is the camera manufacturers that come up with their own specification. It appears most of those are based on the TIFF format, but with modified headers and additional tags (sections).

And even among files with the same extension, there appear to be differences: I have .DNG files here, some do not have JPGs embedded, some do 1, and some even 2.

Apart from RAW files JpegDigger also accepts .JPG and .CHK files as source. It has helped me and many others to extract lower resolution previews from corrupt JPEG files.

The .CHK file option is useful when Chkdsk nuked your SD or other memory card and converted clusters to Filennnn.chk files (n being a number). Ran into that myself recently.

Extract JPEG files from corrupt RAW files

JpegDigger is very easy to use:

Select location of the corrupt RAW files

Select folder containing corrupt RAW files

Select the location of the corrupt RAW files. JpegDigger will automatically create a output folder in the directory as well. It is therefor advised to store the corrupt files on your hard drive rather than a memory card.






Select JepgDigger scan settings

Set JpegDigger scan settings

Select scan depth. All files I tested went fine with the default setting. You also need to select the file extension. JpegDigger now examines the RAW files and see if there are any JPG files to extract. A file can of course be too corrupt.

If you have experience with a specific scan depth for a specific RAW file, please share!


JpegDigger extracting JPEGs from .NEF files

JpegDigger examines the files Extract JPEG files from corrupt RAW files



JpegDigger is done. It will open output folder after clicking OK

JpegDigger is done. It will open output folder after clicking OK

Why JpegDigger?

JpegDigger was created out of an immediate need. Because of My Jpeg repair service people also contact me to ask if I can repair corrupt RAW image format files. I can not at this time, nor do I have the time to investigate these file formats.

It is common knowledge that a lot of RAW image files contain embedded JPEGs and for some that is better than nothing at all. For those people I was able to Extract JPEG files from RAW image files on several occasions. I use a hex editor for that. Some times I do it for free (for a few files), normally I charge the ‘Low Res Preview’ extraction fee (see).

At some point I had to do a huge load of .NEF (Nikon RAW files) so I decided it was time to put together a utility (JpegDigger) to process all .NEF files in a given directory.

Note this software is quad (quick and dirty) and there is lot’s of room for optimization. Which I will do as soon as I find the time. Anyway, you need to consider that the initial impulse to write the tool is for me to have something to extract JPEGs from RAW files automatically. Until now I had to:

  • Open each RAW file in a hex editor.
  • Search for a JPEG header.
  • Search for an end marker.
  • Copy the block between the two into another file with a .JPG extension.

So there you have it. Far from perfect and nothing like the awesome JPEGsnoop, but it fits my needs.


To determine signatures I examined RAW files taken from:
And also:


  • (June 25, 2017) – initial release
  • (June 27, 2017) – Drag & drop: drop file on EXE and source path is set. Better end of file detection (for the JPEG).
  • (January 30, 2018) – Added JPG and CHK as source file options. Fixed problem extracting from certain NEF and CR2 files that were sent to me (thanks for that!). Better detection of ‘nested’ JPEGs.

6 thoughts on “JpegDigger – extract JPEG from corrupt RAW files (.NEF, .CR2 etc.)

  1. Nicole Louis

    Hi is there a version for a Mac? Thank you this would be brilliant if I could use on my mac computer

  2. Bernardo Cabral

    Hi there,
    while shooting a graduation party, some of the files on my SD Card stopped being displayd. The camera OSD showed a message saying that communication between camera and card was not possible. Computers were not able to open the files either.
    I used a program to extract the files but there were some files which I still can’t open, neither on computer nor in LR.
    I also used JpegDigger to try to open the rremaining files though with no success.
    Would you give me some tips on how to extract the Jpeg from those corrupted Cr2 files?
    Thanks in advance,

  3. Joep Post author


    I am sorry to hear that … You used a program to extract files .. From where? From the card or from the already existing files?

    Did you already try using a card reader rather than getting the files by attaching the camera to the computer?

  4. Jeff

    HI I tried using your program and after I extract the zip file and attempt to run the program the exe in the extracted file just deletes itself… Not sure whats going on. Thank you for your help. trying to run on windows 7


Leave a Reply

Your email address will not be published. Required fields are marked *