exiftool(1)
Read, write, and manipulate image metadata (EXIF, IPTC, XMP, and more).
Synopsis
exiftool [OPTIONS] [-TAG[+=<VALUE>]] [FILE]...Description
exiftool is a powerful command-line utility for reading and writing metadata in image files. It supports EXIF, IPTC, XMP, GPS, and other metadata formats across a wide range of image types including JPEG, PNG, GIF, TIFF, and RAW formats.
You can extract metadata, modify tags, copy metadata between files, and perform batch operations. By default, exiftool reads and displays metadata without modifying the original file unless explicitly instructed with write flags.
Common options
| Flag | What it does |
|---|---|
-a | allow duplicate tag names in output (print all instances) |
-G | print tag group name (e.g., EXIF, XMP) before each tag |
-s | short output: print only tag values, no tag names |
-n | print tag ID numbers in addition to tag names |
-ee | extract embedded metadata (useful for files containing images) |
-overwrite_original | overwrite original file when writing metadata (dangerous, use with care) |
-b | output binary data (useful with -b TAGNAME to extract raw binary) |
-csv | print metadata in CSV format for batch processing |
-j | output metadata in JSON format |
-config | read config file for custom tag definitions and settings |
-r | recursively process directories |
-if | conditional processing (only process files matching expression) |
Examples
Display all metadata tags and values for a JPEG file
exiftool photo.jpgShow metadata grouped by category (EXIF, XMP, IPTC, etc.)
exiftool -G1 photo.jpgSet artist and copyright metadata (creates backup as photo.jpg_original)
exiftool -Artist="John Doe" -Copyright="2024" photo.jpgUpdate artist tag on all JPEG files in place (no backup)
exiftool -overwrite_original -Artist="Jane Smith" *.jpgChange the original photo timestamp
exiftool -DateTimeOriginal="2024:01:15 14:30:00" -overwrite_original photo.jpgExport metadata from all JPEGs to CSV file for spreadsheet analysis
exiftool -csv *.jpg > metadata.csvRecursively extract metadata from all images in current directory as JSON
exiftool -r -j . > all_metadata.jsonCopy all metadata from one image to another
exiftool -TagsFromFile source.jpg -all:all target.jpg