What is the NEF file format?
.nef is a raw image file that stores data exactly as it was captured by the camera's sensor. .nef is a proprietary format developed by Nikon, built on a TIFF-based container - most files begin with the little-endian TIFF header (49 49 2A 00) at offset 0, with Nikon-specific MakerNote tags embedded inside. While Nikon's own software, Nikon NX Studio, offers the deepest integration, many third-party tools such as Adobe Lightroom, darktable, and RawTherapee also support it.
.nef files tend to be large, but Nikon cameras aimed at non-professionals use compression to keep file sizes manageable. Professional and semi-professional models allow users to choose between uncompressed, lossless-compressed, and lossy-compressed output - the lossy mode only slightly reduces image quality.
.nef files store not only raw sensor image data but also metadata and complete information about the device with which the image was taken, including the author, copyrights, GPS data, and image parameters that can be adjusted non-destructively:
- Exposure,
- ISO,
- Contrast,
- Tone,
- White balance,
- Hue and saturation.
.nef files also retain a history of all changes applied during editing, letting users revert any modification at any time. An embedded JPEG preview - a thumbnail and often a full-resolution preview - is included for quick browsing without loading a raw processor. Editing raw images is often compared to developing analog photos, which is why RAW formats like .nef are sometimes called digital negatives. Once finished, images can be saved back as .nef, exported to another format, or converted to the more universal .DNG container for broader compatibility. Compact Nikon cameras instead produce .NRW files, a simplified variant of the same TIFF-based container.
Security & safety
RISK: LOWNEF is a passive image data file - sensor data and metadata, not executable code, so opening one is safe. The practical cautions are non-malware: NEF is large and proprietary, so keep originals backed up and consider archiving to open DNG for longevity; and remember EXIF/MakerNote metadata (camera, lens, timestamps, sometimes GPS) travels with the file - strip it before publishing if privacy matters. Editing in raw developers is non-destructive, so the original NEF is preserved. Beware fake "NEF viewer/converter" download sites bundling adware; use Nikon NX Studio or the Microsoft Store Raw Image Extension instead.
Format details
in a nutshellPrograms that open NEF files
Technical details
deep spec| Container format | TIFF/EP-based binary; uses IFD (Image File Directory) chain structure shared with standard TIFF |
| Magic bytes | 49 49 2A 00 (little-endian TIFF signature) at offset 0; some early variants use big-endian 4D 4D 00 2A |
| MIME type | image/x-nikon-nef |
| Raw bit depth | 12-bit or 14-bit per channel depending on camera model and user setting |
| Bayer CFA data | Stores raw Bayer-pattern sensor data; full demosaicing is performed by the raw-processing application, not in-camera |
| Compression options | Uncompressed, lossless compressed, and lossy compressed - selectable per camera model |
| Embedded preview | Includes a JPEG thumbnail and a full-resolution JPEG preview for quick display in file browsers |
| Metadata standard | EXIF 2.x with a Nikon-proprietary MakerNote IFD for camera-specific shooting data |
| Non-destructive editing | Adjustments stored as metadata inside the file or in a sidecar .xmp file; original pixel data is never overwritten |
| Compact camera variant | .nrw - used by Nikon COOLPIX compact cameras; simplified NEF container, same TIFF base |
| DNG conversion | Can be losslessly converted to .dng via Adobe DNG Converter for universal raw-processor compatibility |
| White balance | Shot white balance recorded as EXIF metadata; freely re-adjustable in any supported raw processor |
| Typical file size | 15-50 MB per image, varying with sensor resolution (e.g. 24 MP vs. 45 MP) and compression setting |
| GPS data | Optional GPS coordinates embedded as EXIF GPSInfo IFD when camera body or paired device logs location |
| Released | circa 1999 (Nikon D1); still in use on current Nikon bodies |
| Specification | www.nikonusa.com |
NEF conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about NEF files.