Picture Batch NEF to PNG

NEF to PNG

Converting a Nikon NEF to PNG gives you a picture with no compression loss after the raw decode — useful when the image is headed into an editor, a scientific or inspection workflow, or anything else that should not inherit JPEG artefacts. The NEF's sensor data is decoded here in your browser, Nikon's compression and all, and the camera's embedded preview is only ever a labelled last resort.

Drop NEF images here

NEF files — or any of PNG, JPEG, WebP, AVIF, BMP, ICO, TIFF, GIF or camera raw (CR2, CR3, ARW, DNG, RAF, ORF, RW2). Everything runs on this device.

Or paste an image from the clipboard.

Your images never leave this device. They are decoded and re-encoded by your own browser, and the security policy on every page blocks this site from sending them anywhere.

Lossless, keeps transparency, universally supported, larger than modern formats.

Quality

PNG is lossless — it stores every pixel exactly, so there is nothing to trade away.

Size

Images keep their original dimensions.

Rotate

Images are turned upright from their own orientation data, and left that way.

Transparency

Kept. PNG stores a full alpha channel, so cut-outs and soft edges come through exactly.

Metadata

Exif is carried across where both formats can hold it. Nothing currently in the queue has any.

Sensor detail

Decodes at the file's full resolution, interpolating missing colours when it has a colour filter array. Files already holding colour pixels need no demosaicing.

White balance

The value your camera recorded when the shutter fired — what you saw on the back of the camera.

Camera, lens, exposure and capture time are written into the PNG when those fields are present. The file details show whether GPS data exists, but coordinates are deliberately not written, and colour comes out as sRGB.

What happens to your image

File size depends mostly on the image itself.

What is preserved and what is lost converting NEF to PNG
PropertyOutcome
Transparency Preserved: NEF images have no transparency to lose.
Image quality Preserved: Unchanged. Both formats are lossless, so every pixel comes through exactly.
Colour Partly preserved: LibRaw develops the sensor data into eight-bit sRGB. The output uses that colour space; a source colour profile is not copied into the output.
Exif metadata Partly preserved: When metadata is switched on, the camera, lens, exposure and capture time recorded in the raw file are assembled into a standard block and written into the PNG. Switch it off to remove them. The GPS position is shown to you in the file details and deliberately never written.
Orientation Preserved: Applied to the pixels, and the tag is reset to upright afterwards so nothing rotates the image a second time.

What happens to a NEF on its way to PNG

First the compression is undone. Most NEFs are Huffman-coded, and the default "lossy compressed" mode also passes values through a curve that spends fewer levels on highlights; LibRaw reverses the curve Nikon stored in the file. Lossless-compressed and uncompressed NEFs need only the unpacking.

Then the image is built: black level removed, white balance applied — the camera's recorded value by default — the Bayer mosaic interpolated with adaptive homogeneity-directed demosaicing, the colour matrix for that Nikon body applied to reach sRGB, and a tone curve with automatic brightening mapped over the result.

Finally it is encoded as PNG, reopened and decoded again, and compared with the pixels that went in. A PNG that does not match what the decoder produced is reported as a failure rather than offered as a download.

Lossless output, eight-bit picture

PNG keeps every decoded pixel exactly, so there is no second round of loss however many times the file is saved. That is the point of choosing it over JPG.

It does not keep everything the NEF had. A Nikon raw file holds twelve or fourteen bits per photosite; the PNG holds eight bits per channel after white balance, colour conversion and the tone curve have been applied. For an editing workflow that depends on raw latitude — pulling back highlights, lifting deep shadows — keep the NEF and develop it in a raw editor. For a faithful, neutral, lossless picture, this is what PNG output is.

Which NEFs convert

Support is per camera body and per compression mode. Uncompressed, lossless-compressed and lossy-compressed NEFs from bodies this LibRaw build knows are decoded from their sensor data. The test file this page is checked against is a medium-size raw from a Z 5 II, a current mirrorless body — still Bayer sensor data, so it is demosaiced exactly like a full-size file, at 4000 × 2672.

Not every reduced-size NEF works that way. The small raw option on some older bodies, such as the D810, stores already-demosaiced pixels instead, and those convert without an interpolation step. The queue reports which kind it found.

High-efficiency raw (the HE and HE* modes on recent Z bodies) uses a licensed codec that is not in this build, so those files fail with an explicit message naming the camera rather than producing a preview passed off as a conversion. Coolpix NRW files are read as well.

If something goes wrong

"The sensor data in this file could not be decoded."

High-efficiency raw, a camera body newer than this decoder, or a damaged copy.

What to do: For new files, set the camera to lossless-compressed raw. For existing ones, Adobe's free DNG Converter writes a DNG that converts here.

The PNG looks less vivid than the picture on the camera's screen.

The screen shows a JPEG made with Nikon's Picture Control. No Picture Control, Active D-Lighting or vignette control is applied here.

What to do: Expected. Apply contrast and saturation in your editor; the lossless PNG takes that without any compression artefacts getting in the way.

Converting is slow, or the browser warns about memory.

A 45-megapixel Z 8 or D850 file needs well over 700 MB of working memory to demosaic, and PNG encoding of that many pixels is itself substantial work.

What to do: Choose half resolution: it skips interpolation, needs a quarter of the memory and produces a quarter of the pixels, which also makes the PNG a quarter of the size.

Questions

How big will the PNG be?

It depends heavily on the picture. A PNG stores three full channels per pixel, and fine detail and sensor noise compress poorly without loss, so a detailed, high-ISO frame can produce a PNG several times the size of the NEF, while a smooth, evenly lit scene stays far smaller. The 10.7-megapixel NEF this page is tested with produced a 4 MB PNG; the eight-megapixel Canon frame the CR2 page is tested with produced 19 MB. If size matters more than losslessness, JPG at quality 90 is a fraction of either.

Is the colour accurate?

It uses the colour matrix measured for your Nikon body and your camera's recorded white balance, rendered to sRGB. It will not match Nikon NX Studio exactly, because Nikon's own software applies its Picture Controls and tone curves, but it is a faithful neutral rendering.

Does the PNG keep my lens and exposure details?

Yes, when metadata is on: the camera, lens, shutter speed, aperture, ISO and capture time are read from Nikon's maker notes and written into the PNG's Exif chunk. GPS position is never written.

Related