Strip all EXIF, IPTC, and XMP metadata from photos and files before sharing them.
Every photo taken with a phone or camera embeds metadata into the file: GPS coordinates, device model, serial number, timestamp, software version. Sharing a photo without stripping this first leaks more than you might intend.
ExifTool is the standard tool for reading and writing metadata across almost every file format — JPEG, PNG, PDF, MP4, and more.
brew install exiftool
Before stripping, it's worth seeing what's there:
exiftool photo.jpg
To see only GPS data:
exiftool -gps:all photo.jpg
Strip everything from a single file:
exiftool -all= photo.jpg
ExifTool creates a backup of the original as photo.jpg_original. Delete it once you've confirmed the output is clean:
rm photo.jpg_original
To strip and skip the backup in one step:
exiftool -all= -overwrite_original photo.jpg
Strip all metadata from every JPEG in a folder:
exiftool -all= -overwrite_original -ext jpg /path/to/folder/
Recurse into subfolders with -r:
exiftool -all= -overwrite_original -r /path/to/folder/
Sometimes you want to keep the creation/modification dates (useful for photo libraries) but remove everything else, especially GPS:
exiftool -gps:all= -overwrite_original photo.jpg
Or remove everything except the date fields:
exiftool -all= -tagsfromfile @ -datetimeoriginal -overwrite_original photo.jpg
exiftool photo.jpg
A clean file will return only basic format info — no GPS, no device data, no software tags.
ExifTool modifies files in place. Always work on a copy or use the backup file it creates by default, unless you pass -overwrite_original.
Last updated: 18-05-2026 at 12:51