How to Extract the JPEG Preview From RAW Files With ExifTool
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:
| Format | Largest preview is usually in |
|---|---|
| CR2, ARW, ORF, PEF, DNG | PreviewImage |
| NEF, RAF, RW2 | JpgFromRaw |
| CR3 and anything else | Check — 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 .
-boutputs binary data.-w %d%f.jpgwrites to the same directory, same base name,.jpgextension.-rrecurses into subfolders.
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
- Small output: some cameras (many Sony bodies, DJI drones, phones) only embed reduced-size previews. See what the embedded JPEG preview is.
- Windows quoting: in Command Prompt, use the same commands; in PowerShell, wrap arguments containing
%in single quotes. - Mixed folders: repeat
-extfor each extension, or run one command per brand.
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 →