NEF

What is an NEF file?

Nikon raw capture. TIFF based, which is why generic tools half-open it and get the colours wrong.

What NEF is

NEF is a container: a wrapper that holds streams encoded by something else. It stores a grid of pixels, so enlarging it past its own resolution softens it. It is used for photography and editing.

The extension is .nef, and the full name is Nikon Electronic Format. Both matter less than what the file can hold, which is what the rest of this page is about.

Where NEF came from

Nikon published it in 1999. It comes out of Nikon digital SLRs and Z-series mirrorless bodies bodies.

A format that has been readable for that long is a format worth trusting with something you want back in ten years.

The specification belongs to its vendor

Reading it outside the vendor’s own software depends on work done by other people, usually by inspection rather than by documentation. That mostly works and occasionally does not, which is the reason to convert anything you intend to keep.

Nothing is thrown away

NEF stores its content exactly. Saving it again changes nothing, so it can be opened, edited and re-saved as often as you like without accumulating damage — which is what makes it a working format rather than a delivery one.

It cannot be transparent

NEF has nowhere to record transparency. Anything transparent in the source is filled with a solid colour on the way in — white, unless something chooses otherwise.

Colour it can describe

Up to 14 bits per channel. It can work in RGB.

More than eight bits per channel is what stops a gradient from stepping when it is edited, which is why it matters in a working file and rarely in a finished one.

What opens NEF

Adobe Lightroom, Nikon NX Studio and darktable read it, and so do most programs of the same kind.

If a file will not open, the format is rarely the problem — it is more often that the program predates it. Converting to something older is the reliable way past that, and it is what the rest of this site is for.

Opening it in a browser

No browser reads it.

That is the single most common reason to convert it: not that the format is bad, but that the place you want to show the file cannot read it.

What it can carry besides the content

NEF can hold EXIF, XMP and GPS coordinates.

The GPS coordinates are the field worth thinking about before sending a file anywhere: they say where the photograph was taken, and almost nothing warns you that they are still in there.

It is a working format

NEF is meant to be opened and changed. Keep the file in this format for as long as the work is going on, and export from it whenever a finished copy is needed.

What goes wrong with it

The recurring complaints: programs often show an embedded preview rather than the real data and support outside its home ground is uneven.

None of these is a reason to avoid the format. They are the things worth knowing before you are surprised by one, which is a different claim and a more useful one.

Nikon encrypted part of the file, and it became a public argument

In 2005 Nikon shipped the D2X and D2Hs writing NEF files in which the white balance data was encrypted. The image itself was readable; the camera’s own record of how the scene should be interpreted was not, which meant third-party converters could not reproduce Nikon’s colour without guessing.

Adobe said publicly that it would not circumvent the encryption, photographers objected loudly, and the episode became the standard example in a long-running argument about proprietary raw formats. Nikon later provided access under agreement and the practical problem receded. The principle it exposed did not: a raw file is only as durable as the manufacturer’s willingness to let it be read.

Why that argument still matters

Nothing about the episode was unique to Nikon except the encryption. Every manufacturer raw is an undocumented format read by inference, and every one of them depends on companies continuing to care about cameras they stopped selling years ago.

That is the whole case for DNG, and it is why the case is usually made with this story attached. For a photographer deciding whether to convert an archive, the question is not whether NEF works today — it does, everywhere — but who will be able to read it in twenty years and on whose terms.

Nikon has a lossy raw option too, and it is not obvious

Many Nikon bodies offer compressed NEF alongside lossless compressed and uncompressed. The plain compressed setting applies a tone curve before storing, discarding levels in the highlights where the eye is least sensitive — it is lossy, and the menu does not say so in those words.

The difference is invisible in ordinary use and appears exactly where raw earns its keep: heavy highlight recovery, strong exposure adjustment, extreme crops. Lossless compressed gives an identical image at nearly the same file size and is the setting to choose. As with Canon’s C-RAW, the decision is taken at the shutter press and cannot be revisited.

Twelve or fourteen bits, and where it shows

Nikon bodies record 12 or 14 bits per channel depending on model and mode, and several drop to 12 in high-speed continuous shooting without making it prominent. Fourteen bits is 16,384 levels against 4,096.

The visible consequence is the same as everywhere else: how far a shadow can be lifted before a gradient bands. Both figures dwarf a JPEG’s 256, so the argument for raw holds either way — but if a burst frame proves less recoverable than a single shot from the same session, the drop to 12 bits is usually why.

NEF and NRW are not the same

NEF is the format from Nikon’s DSLRs and Z-series mirrorless bodies. NRW is what some Coolpix compacts wrote, and although it is also Nikon raw it is structurally different enough that software supporting one may refuse the other.

If a Nikon raw file is rejected by a program that handles your other Nikon files, checking the extension is the first step. It is a small thing that accounts for a disproportionate share of confusion, because both are described as Nikon raw everywhere they are mentioned.

Picture Controls, and the flat file people did not expect

Nikon’s Picture Controls — Standard, Neutral, Vivid, Flat, Monochrome — are applied when the camera writes a JPEG and recorded in the NEF as a setting rather than baked into the sensor data.

So an NEF opened in Nikon’s NX Studio shows the look you chose, and the same file opened in something that ignores the tag shows a flat, neutral conversion. Photographers regularly conclude the file is wrong or the converter is bad. Neither is true — the interpretation simply has not been applied, and the embedded preview shows the intended look even when the converter does not.

The JPEG inside, and when it saves you

Every NEF embeds a full-size JPEG preview with the camera’s processing applied. It is the file browser thumbnail, and it is why an image sometimes appears to change as an editor finishes loading.

For a body too new for your software — the perennial raw problem — extracting that preview gives a usable full-resolution photograph with the look you chose while you wait for support. It has none of the editing latitude, and it is a photograph rather than nothing.

What the file records about the shot

Camera model and serial number, lens, focal length, aperture, shutter speed, ISO, the exact date and time, the Picture Control, the shutter count on many bodies, and location where the camera had GPS or was paired with a phone.

The shutter count is worth knowing about if a camera is being sold with sample images, since it discloses how much the body has been used. Little of this survives conversion to JPG or PNG the way people assume, and the location in particular deserves a deliberate decision before publishing.

Converting, and keeping the negative

To share or print, JPG at high quality. For work outside a raw editor, or where every pixel must survive, PNG or TIFF. For an archive meant to outlive the camera, DNG — which is where the encryption story leads and why it is told at the top of this page.

Keep the NEF in every case. The converted file has the white balance, the tone curve and the colour interpretation baked in permanently, and no conversion recovers them. The raw file is the only version that still holds every one of those decisions open.

The facts, in one place

Identifiers and provenance for the NEF format.
Extension.nef
Media typeimage/x-nikon-nef
Published byNikon
First published1999