BatchRAW
BatchRAW / Guides

How to Extract the JPEG Preview From RAW Files With ExifTool

Published

ExifTool by Phil Harvey is the standard tool for reading and writing photo metadata. It can also pull out the JPEG previews cameras embed in RAW files — the same technique BatchRAW uses — from the command line on Windows, Mac or Linux.

Which tag holds the big preview?

Manufacturers store previews under different tag names:

FormatLargest preview is usually in
CR2, ARW, ORF, PEF, DNGPreviewImage
NEF, RAF, RW2JpgFromRaw
CR3 and anything elseCheck — see below

It varies by model, so check one file first. This lists every embedded image and its size:

exiftool -preview:all IMG_0001.CR3

Extract from a whole folder

# Nikon: full-size preview, written next to each NEF
exiftool -b -JpgFromRaw -w %d%f.jpg -ext NEF -r .

# Canon CR2
exiftool -b -PreviewImage -w %d%f.jpg -ext CR2 -r .

Grab every preview, whatever the tag

exiftool -a -b -W %d%f_%t%-c.%s -preview:all .

This writes every embedded image with its tag name in the filename; keep the biggest.

Copy metadata and orientation into the JPGs

Extracted previews often carry little or no EXIF. Copy it back from the RAW:

exiftool -tagsfromfile %d%f.NEF -all:all -overwrite_original -ext jpg .

That copies capture date, camera settings, GPS and orientation, so portrait shots display upright. See what happens to EXIF when converting RAW for when you might not want that.

Things that trip people up

Prefer not to use the command line?

BatchRAW does the same extraction in a browser tab — it picks the largest valid preview automatically, applies orientation, and can resize and recompress. Files stay on your computer.

Convert RAW files to JPG in your browser. BatchRAW is free, needs no install or account, and your files never leave your device. Drop a whole folder and get a ZIP of JPGs back.

Open BatchRAW →