Introduction
NEF is the raw photo format of Nikon’s digital cameras. It holds the data from the camera’s sensor before any processing, together with the camera settings and a JPEG preview. A raw converter turns it into a finished photo.
Nikon has not published the format. Other programs read it by following the work of open source projects that worked out its layout and compression.
Structure
A NEF file is a TIFF file. It begins with a TIFF header and a chain of image file directories (IFDs) of tags. The main IFD and its sub-IFDs point to one or more JPEG previews and to the raw sensor data, which is stored uncompressed or with Nikon’s own lossless or lossy compression. The Exif data carries a Nikon maker note with the camera’s settings, some of it encrypted.
The raw data page describes the directories, the maker note header and tags a decoder needs, and Nikon’s compression, from public reverse engineering.
Not described
Nikon has never published NEF. These pages follow dcraw and ExifTool; the parts below are not covered yet.
Known, not yet covered
- Reference: the layouts of the encrypted maker note sub-tables (ShotInfo, ColorBalance, LensData) and the decryption look-up tables, which dcraw and ExifTool carry; the raw data page names them only. The entries of the other maker note sub-directories are not listed.
- Reference: the packed 12-bit and 14-bit bit order and the YUV
(
nikon_yuv_load_raw) layout, which are in dcraw’s code but were not re-read in this check; the NEF thumbnail and NRW (compact camera) variants. - Viewer: none. The file opens as raw bytes only.
Unknown
- Reference: the High Efficiency and High Efficiency ★ coding of the Z cameras (NEFCompression 13 and 14), reported to be intoPIX’s TicoRAW, which has no public description. The page names the values only.
Links
Software
- Nikon NX Studio – Nikon’s free app for viewing and developing its raw photos (Windows, macOS)
- Adobe Lightroom – Adobe’s photo library and raw developer (Windows, macOS, mobile)
- Adobe Camera Raw – the raw converter built into Photoshop (Windows, macOS)
- Capture One – raw photo editor for professional photographers (Windows, macOS)
- darktable – free raw photo developer (Windows, macOS, Linux)
- RawTherapee – free raw photo developer (Windows, macOS, Linux)
- digiKam – free photo manager with a raw import tool (Windows, macOS, Linux)
Developers
Reference
- Nikon tags – ExifTool’s list of the Nikon maker note tags