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.

I wanted to say how impressed I was with your JpegDigger program. It recovered excellent JPGs (thumbnails, intermediate- and full-resolution) from corrupted NEF files today where nothing else I tried would. Nikon’s View-NXi exported corrupted JPGs/TIFFs and they were corrupted viewed on my Mac Mini as well. It was really fast and free, too. So thanks, Joep! – Source

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

If you have corrupt RAW image files after you have recovered them from an SD card for example, then these simply may have been recovered incorrectly. JPEG Recovery LAB is often able to recover those intact due to it’s ability to recover and reconstruct fragmented files. Before giving up on your CR2 or NEF files, give JPEG Recovery LAB a try.

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.

Some of the images I was able to recover thanks to #jpegdigger Moral of the story is always set your camera to write to both cards and #rawplusjpg Better safe than sorry. And make sure the camera is done writing to the card before swapping the battery. #marysville #mmx #dirtshark #motolife #teamhonda #motocross #nikonusa #d810

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.

Need a nice website? Or photos for an existing site? Or both?

Need a nice website? Or photos for an existing site? Or both? Check out Stan’s website!


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:

  1. 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.
  2. 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!)
  3. Review files.
Select location of the corrupt RAW files

Select folder containing corrupt RAW files








Select JepgDigger scan settings

Set JpegDigger scan settings




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.

If you want to see the actual process, this video made by Pluss1 explains it well.

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.

23 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

  5. Light Oriye

    This probably is the biggest challenge I’ve faced. Tried jpegdigger no solution. The images taken and previewed on set where fine, only to return home see rainbow lines on all the images. What is the possible solution? On cf card Nikon d700

  6. Light Oriye

    OMG this is amazing. Thanks so so very much. I’m short of words to say thank u. God bless you

    1. Joep Post author

      Did it work out? Sounds like it .. Thanks!

      Care to tell what is in between “tried jpegdigegr no solution” and “omg this is amazing”?

  7. Larry Sabo

    Thanks for such a terrific program! NEF files displayed in Nikon’s View-NXi on PC or Mac looked perfect but exported JPGs and TIFFs were a mess. JpegDigger extracted perfect JPGs!

    The only suggestion I would offer, is to allow the program to convert just the selected NEF file, rather than all files in the directory, at a selected resolution, e.g., just the highest resolution rather than thumbnail, medium, and high resolution JPGs. By linking JpegDigger to Nikon’s View-NXi, that would allow one to browse images in View-NXi and export just desired NEF files as PGs at the desired resolution. Otherwise, it creates a lot of JPGs when only one is desired.

    1. Joep Post author

      Thank you Larry! As I am not familiar with View-NXi (I am not even a photographer myself) I have trouble following that work-flow thingy. However I think ignoring smaller resolution JPEGs should be possible, I’d have to look at the code for that. If I remember correctly I am already getting height*width but not doing anything with that info right now.

  8. lisa dereck

    Did the program work for anyone? It seem to not work for my JPEGs. Please help to know what to do.

    1. Joep Post author

      I am so sorry, I never noticed your comment. You still need help with this? Maybe email me a few of the JPEGs ( to see if I can help.

  9. iz

    im a wedding photographer some files were non existent when i went to upload them im honestly desperate. hoping this works i found the files but they won’t open and no preview shows either. i have a mac so i had to buy a windows laptop waiting for it to get here. crossing my fingers hoping your software works ! thx!

  10. James

    Hi I have installed and ran the software to no avail.. It says it cant find my RAW files? Can you help me getting the software to function?

      1. James

        I just watched and ran it again. Says that 0 files were saved. Not sure whats going on

          1. Joep Post author


            Well, tried it and it recovered 3 JPEGs from the NEF you sent me. I set scan depth to 100% just to make sure I’d get all embedded JPEGs.

            Kind regards,

  11. kate

    What a lovely and helpful chap! Joep was super calm and helped me extract files from a corrupt card with a wedding on it. Can’t recommend him highly enough – fab work Joep

  12. Rachel Pigue

    I’ve been trying all kinds of programs & can’t seem to figure out how to extract these photos. Can you email me with your email & I can send them to you, and you can see what needs to be done? These are photos of a family member that has recently passed away & we need to get these photos recovered.

    Thank you for your time


Leave a Reply

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