I had some NEF files in a folder that I didn't do anything with.
When importing them in Lightroom, no previews and a "file unsupported or damaged message"
So I tried with Nikons ViewNX, nothing. Even not in DxO or PhotoMechanic.

I had a look with EXIFTool and the corrupt file prints me only this:

ExifTool Version Number         : 8.39
File Name                       : _DSC5559.NEF
Directory                       : /Users/tunafish/Desktop
File Size                       : 12 MB
File Modification Date/Time     : 2010:11:29 12:46:56+01:00
File Permissions                : rwxrwxrwx
Error                           : File format error

I saw another question on photo.stack Damaged RAW (NEF)-files: ideas? and tried to copy over the makernotes from a good file (_DSC5556.NEF) with

exiftool -tagsfromfile _DSC5556.NEF -makernotes _DSC5559.NEF

but EXIFTool gives me this error

Error: Not a valid TIFF - _DSC5559.NEF
0 image files updated
1 files weren't updated due to errors

I have uploaded 2 NEF's, with _DSC5559.NEF being the corrupt one here:
Corrupt NEF files

  • 3
    \$\begingroup\$ What is the question here? How to fix these files? What went wrong? How to prevent it in the future? \$\endgroup\$
    – mattdm
    Commented Oct 10, 2011 at 23:42
  • \$\begingroup\$ Are the two zipped NEF's the originals or are they the files you got after copying over the notes? If the latter, please provide the originals. (In order to prevent this in the future, one tip I've heard is to format the card often.) \$\endgroup\$
    – anon
    Commented Oct 11, 2011 at 3:53

2 Answers 2


Looking at the two files with a hex editor (HxD), the corrupt one is definitely not a valid NEF file. It is missing the header information (missing or overwritten by something else).

All I can suggest is use a hex editor and open several of your corrupt files and compare the first couple of dozen bytes. See if there is a pattern. Looks like the files have been overwritten with data and you're probably out of luck.


I had a similar problem. But in my case, my files got deleted by ViewNx and had to recover data with some recovery software, specifically EASEUS Recovery. It recovered the files but those files were corrupted.

No image viewer could recognize those files and View Nx showed error "unsupported File". I inspected the files with a hex viewer and found the data on those files were garbage. No header for .NEF file or any info. I also tried fix_corrupted_nef tool, a free utility to fix corrupted nef file from Exif-tool with no luck.

At that point, I assumed that the recovery went wrong, I tried once again to recover file from my SD card. But this time, I used a free utility from transcend, Recover RX. And Bang!!!!!! It fetched 100% data cleanly. I got all my files back those were deleted from SD card. This thread is old, but thought i'd share it.. may be someone else need this help.

  • \$\begingroup\$ Trying multiple programs is good advice. (And as you found, it's not always the pricey ones that work.) PhotoRec is another good free option to try. \$\endgroup\$
    – mattdm
    Commented May 12, 2015 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.