The basics
What is a NEF file?
NEF is the raw format of Nikon cameras: the D-series digital SLRs since the D1 of 1999, and the Z-series mirrorless cameras. When the camera is set to RAW (or RAW + JPEG), each photo is saved as a .nef file holding what the sensor recorded, with the camera's settings stored alongside rather than applied.
Raw means the data comes from before the camera has made a picture. A sensor sees only brightness, through a mosaic of red, green and blue filters, so each photosite has one colour value. To make a photo, software has to estimate the two missing colours at every pixel (demosaicing), apply the white balance, convert the camera's colours into a standard colour space and apply a tone curve. Nikon describes white balance, hue, tone and sharpening as "instruction sets" stored in the file, which you can change later without touching the sensor data.
- More levels. A NEF holds 12 or 14 bits per photosite: 4,096 or 16,384 levels, against 256 per channel in an 8-bit JPG. That's what lets you rescue shadows or pull back highlights.
- It looks flat at first. A raw file shown with neutral settings has less contrast and saturation than the camera's JPEG, which had a picture style applied. That's expected, not a fault.
- A JPEG is hidden inside. Each NEF carries JPEG previews, which is what the camera's screen, thumbnails and quick viewers show. That's why a NEF can look right in one app and different in another: one shows the preview, the other renders the raw data itself.
- It's a capture, not a delivery format. Nobody can view a NEF in a browser or most phone apps. Export a JPG, HEIC or PNG to share.
NEF and NRW
Some Nikon Coolpix compacts, such as the P6000 and P7000 series, save raw files as .nrw instead. NRW is also TIFF-based and opens in the same software, but it's a separate variant: rename an NRW to .nef and some programs will reject it.
Anatomy
What's inside a NEF file
Nikon doesn't publish the NEF specification. This outline is assembled from the signatures in the UK National Archives' PRONOM registry (fmt/202) and the tag tables in Phil Harvey's ExifTool; the meaning of most maker-note fields is reverse-engineered, not documented by Nikon. A NEF is an ordinary TIFF file on the outside: a header, image file directories (IFDs) of numbered tags, and data blocks they point to. The exact set of images and tags varies between camera models.
NEF layout (from PRONOM fmt/202 and ExifTool; not a real file)
offset bytes / tag part
0 4D 4D 00 2A TIFF header: "MM", 42 (big-endian)
or 49 49 2A 00 "II", 42 (little-endian)
4 xx xx xx xx offset of IFD0
IFD0 010F Make, 0110 Model, 0132 DateTime …
014A SubIFDs ─────────┐ pointers to the images
8769 Exif IFD ──────┐ │
│ └─► SubIFD: JPEG preview (JpgFromRaw)
│ └─► SubIFD: the raw image
│ 00FE NewSubfileType = 0 (full size)
│ 0103 Compression = 1 (none)
│ or 34713 (Nikon NEF compressed)
│ then strips of sensor data
Exif IFD 829A ExposureTime, 920A FocalLength …
927C MakerNote ─────┘
MakerNote 4E 69 6B 6F 6E 00 "Nikon" and a null byte
02 10 00 00 version (02 00, 02 10 or 02 11)
4D 4D 00 2A 00 00 00 08 a TIFF header of its own,
so offsets restart here
IFD: 001D SerialNumber
0093 NEFCompression lossless, lossy, HE, HE* …
0096 NEFLinearizationTable
00A7 ShutterCount
ShotInfo, ColorBalance, partly encrypted, keyed on
LensData serial number + shutter count- 1
4D 4D 00 2AA normal TIFF header
MMmeans big-endian numbers, then the TIFF magic number 42. PRONOM's signatures include bothMMand little-endianIINEFs. Nothing in the first bytes says "Nikon", which is why some programs treat a renamed NEF as a TIFF and show only a small preview. - 2
014A SubIFDsSeveral images in one file
IFD0 holds the camera make, model and date, and points to sub-directories, each describing another image. ExifTool finds a JPEG preview (it calls it
JpgFromRaw) in one of them; another holds the sensor data. - 3
00FE = 0, 0103 = 1 or 34713The raw image
NewSubfileType 0 marks the full-resolution image. Its Compression tag is 1 for uncompressed data or 34713, a private value meaning Nikon's own compressed NEF data. The pixels follow in strips, one value per photosite of the colour filter, not RGB.
- 4
927C MakerNoteNikon's private data
The standard Exif block (exposure, lens focal length, date) ends with a MakerNote tag, a block Nikon defines for itself. Most of what a raw converter needs to render colours correctly lives here.
- 5
4E 69 6B 6F 6E 00 02 10 00 00Maker note signature
Nikon, a null byte and a version number (02 00,02 10or02 11in PRONOM's signatures). PRONOM uses this pattern, with the TIFF header and tag927C, to tell a NEF from a plain TIFF. - 6
4D 4D 00 2A 00 00 00 08A TIFF inside the TIFF
The maker note carries its own TIFF header, and offsets inside it are counted from here. Because of this, tools can move the maker note within the file without breaking it.
- 7
0093 NEFCompressionHow the raw data is packed
ExifTool lists values for uncompressed, lossless, two lossy types, packed 12- and 14-bit layouts, and High Efficiency (13) and High Efficiency* (14).
0096holds the linearisation table used to decode lossy data. - 8
ShotInfo, ColorBalance, LensDataEncrypted blocks
Parts of the maker notes, including colour balance data, are encrypted. According to ExifTool, the keys are the camera's serial number (
001D) and shutter count (00A7); the method has been worked out, so independent software can read them.
Settings
Lossless, compressed, uncompressed and High Efficiency NEF
Nikon cameras offer several ways to store the raw data. Which ones you get depends on the model. On a D850, for example, the menu has three, and the manual describes them like this:
| Option | Lossless? | What Nikon says |
|---|---|---|
| Uncompressed | Yes | Not compressed. The largest files. |
| Lossless compressed | Yes | A reversible algorithm; about 20 to 40% smaller "with no effect on image quality". |
| Compressed | No | A non-reversible algorithm; about 35 to 55% smaller, with "almost no effect on image quality". |
| High Efficiency* (HE*) | No | Z9 and later models. Nikon calls it visually identical to lossless. |
| High Efficiency (HE) | No | Z9 and later models. Smaller files than HE*. |
High Efficiency raw arrived with the Z9 and is based on TicoRAW, a raw codec from the company intoPIX. Nikon says HE* files are visually identical to lossless ones; HE files are smaller again. Photography Life lists the Z9, Z8, Zf, Z6III and Z5II, all with Nikon's Expeed 7 processor, among the cameras that offer it, and measured HE* files at roughly 30 MB against about 50 MB for lossless compressed, with no visible difference in its tests.
Check your software before switching to HE
High Efficiency files need a decoder for the TicoRAW codec, so fewer programs open them than ordinary NEFs. Lightroom, Photoshop, Capture One, DxO PureRAW, Affinity Photo 2 and NX Studio do. Quick-look previews and some photo apps that handle lossless NEFs from the same camera don't, so test a few files in every app you use first.
Comparison
NEF vs JPG, HEIC and DNG
| NEF | JPG | HEIC | DNG | |
|---|---|---|---|---|
| What it holds | Sensor data plus settings | A finished picture | A finished picture | Sensor data plus settings |
| Bits | 12 or 14 per photosite | 8 per channel | 8 or 10 per channel | Up to 16, or floating point |
| White balance | Change it freely later | Baked in | Baked in | Change it freely later |
| Specification | Private to Nikon | Open (ISO) | Open (ISO) | Published by Adobe, now ISO 12234-4 |
| Opens in | Raw editors and photo apps with raw support | Everything | Most phones, Macs, Windows with an extension | Raw editors and most photo apps |
Shoot NEF when you'll edit the photo: exposure and white balance can be changed far more than in a JPEG. Shoot JPG or HEIF when you need finished pictures straight from the camera. RAW + JPEG gives you both, at the cost of card space. DNG is a raw format with a public specification; converting NEFs to DNG is a common archiving choice, since the US National Archives recommends it for proprietary raw formats like NEF.
How to
How to open and convert a NEF file
- Nikon NX Studio (free, Windows and macOS): Nikon's own viewer and raw editor. It replaced ViewNX-i and Capture NX-D in 2021 and applies the same Picture Controls as the camera, so its results match the camera's JPEG most closely.
- Adobe Lightroom, Lightroom Classic and Photoshop (Camera Raw): the most common choice. Capture One, DxO PhotoLab and Affinity Photo also read NEF.
- Free and open source: darktable and RawTherapee on Windows, macOS and Linux.
- Just looking: macOS Photos and Preview, and iPhone and iPad Photos, open NEFs from cameras on Apple's supported list. On Windows 10 and 11, install Microsoft's free Raw Image Extension for thumbnails in File Explorer and viewing in Photos.
- In the camera: most Nikons have a NEF (RAW) processing item in the Retouch menu that saves a JPEG copy with new settings.
To convert a whole folder, use the export in NX Studio or Lightroom, or the command line. These commands use ExifTool and darktable's command-line tool:
# pull out the embedded JPEG preview (no raw processing)
exiftool -b -JpgFromRaw DSC_0001.NEF > DSC_0001.jpg
# render the raw data to a full-quality JPEG
darktable-cli DSC_0001.NEF DSC_0001.jpg
# list the camera settings and maker notes
exiftool -a -G1 DSC_0001.NEFTroubleshooting
Why won't my NEF file open?
- The camera is newer than your software. Each new Nikon model needs explicit support, because the details change from camera to camera. Update the app. If you can't (an older Photoshop or Lightroom, an older macOS), convert the NEFs with Adobe's free DNG Converter, which Adobe offers precisely for backward compatibility; older versions open the DNGs.
- **It's an HE or HE* file.** See the note above: the app may support the camera but not the High Efficiency codec. Shoot lossless compressed, or use an app that supports HE.
- It opens, but looks different from the camera's screen. The camera shows its own JPEG rendering with your Picture Control. Other apps render the raw data with their own defaults. Use NX Studio, or pick a camera-matching profile in your editor.
- Only a small or low-resolution image appears. The program read the file as a plain TIFF or showed an embedded preview. Use a real raw converter.
- The file is damaged after a copy. A NEF cut short (by removing the card too early) often still shows its preview but fails to decode. Copy it again from the card if you still can.
Privacy
What a NEF file says about you and your camera
A NEF can't run code, but it carries a lot of metadata, and people sending raw files to a client or a forum rarely check it:
- The camera's serial number, in the maker notes (and often the standard Exif serial number tag too). It ties every photo to one body.
- The shutter count: how many photos that body has taken so far, which is why it's often checked when a camera is sold second-hand.
- Location, when GPS was on (a GPS unit, or location from a phone through Nikon's app).
- Owner and copyright text you typed into the camera's menu, plus date, time, lens and every setting.
Check with exiftool -a -G1 file.nef. Stripping all metadata from a raw file isn't a good idea: the maker notes are needed to render it correctly, and the serial number in them is also the key to the encrypted blocks, so deleting or changing it can leave colour data unreadable. Remove location with exiftool -gps:all= file.nef, and when the serial number or shutter count matters, share an exported JPEG with its metadata stripped instead.
Sample files
There are no sample NEF files on this page. Raw files come straight from the camera, so the simplest test file is one shot on a Nikon camera set to RAW; for HE and HE* files, use a Z9, Z8, Zf, Z6III or another model that offers them.
Put it online
Have a NEF file? Give it a link.
Drop a NEF on 99helpers and it gets its own web address. Browsers can't display raw files, so anyone who opens the link downloads the file to open in their own raw software; share a JPG alongside it if people just need to see the photo.
Questions
NEF files, frequently asked
What is a NEF file?
A Nikon raw photo. It holds the camera sensor's data before processing, with the camera settings stored alongside, in a TIFF-based format that only Nikon cameras write.
How do I open a NEF file?
Use Nikon's free NX Studio, Lightroom or Photoshop, darktable or RawTherapee. Macs open NEFs in Photos and Preview; on Windows, install Microsoft's Raw Image Extension and use Photos.
How do I convert NEF to JPG?
Open it in NX Studio, Lightroom, Photos or Preview and export as JPEG. Many Nikon cameras can also do it in the Retouch menu. For a quick copy without processing, extract the embedded preview with exiftool -b -JpgFromRaw file.nef > file.jpg.
Why does my NEF look dull compared to the JPEG?
The camera's JPEG has your Picture Control's contrast, saturation and sharpening applied. Your editor starts from neutral settings. Choose a camera-matching profile or adjust it yourself.
Is NEF lossless?
It depends on the setting. Uncompressed and lossless compressed NEFs keep all the sensor data. Compressed, High Efficiency and High Efficiency* NEFs use lossy compression, designed to make the loss very hard to see.
What's the difference between NEF and NRW?
Both are Nikon raw formats built on TIFF. NEF comes from Nikon's SLR and mirrorless cameras; NRW from some Coolpix compacts. Most raw software opens both.
Why won't Photoshop open my NEF files?
Your Camera Raw version is older than the camera. Update it, or convert the files to DNG with Adobe's free DNG Converter and open those.
Should I convert NEF to DNG?
It's optional. DNG has a public specification and opens in older software, which helps archives. Nikon's own software is built around NEF, though, and Adobe's DNG Converter can embed the original NEF inside the DNG so Nikon's private metadata isn't lost.
Related formats
Other file types explained
Keep going
Related
Sources
- Nikon: Nikon Electronic Format (NEF)
- Nikon D850 Online Manual: NEF (RAW) recording
- Nikon: NX Studio announcement (2021)
- PRONOM: Nikon Digital SLR Camera Raw Image File (fmt/202)
- ExifTool: Nikon tags
- Photography Life: Nikon HE* versus lossless compressed NEF files
Last reviewed 27 October 2026.