Digital photos inherently carry a trove of metadata — from the camera model and lens used to, in many cases, the precise GPS coordinates where the shot was taken. That last part is especially common with smartphone cameras. All of it gets embedded automatically at the moment of capture.
Most of that data is benign or even useful. Knowing your aperture or shutter speed isn’t sensitive. But GPS coordinates can inadvertently reveal your home address, your regular locations, or your habits when you share images online. You might also have stock agency keywords, client notes, or other information in there that you’d rather not broadcast.
For any of those reasons, it’s sometimes worth scrubbing that data before sharing.
Why ExifTool?
There are several ways to tackle this. I’ve previously written about stripping metadata with ImageMagick, and macOS comes with a built-in command-line toolset called SIPS that can do it too. ImageOptim is a free GUI option on Mac that strips metadata as part of its image optimization process.
So why ExifTool? Installing another command-line tool is a few extra steps, and I’ll say upfront that it makes most sense if metadata stripping is something you do regularly as part of your workflow. For one-off or occasional use, ImageOptim is easier.
But here’s why I reach for ExifTool when it matters:
- It’s the gold standard for image metadata manipulation — thorough, precise, and actively maintained. ImageMagick and SIPS are reasonable options, but I’ve seen enough discussion of edge cases where they’ve missed metadata to have some lingering uncertainty about their completeness for this specific task.
- It handles batch processing natively and efficiently. You point it at a folder and it processes everything in one pass — no shell loops needed.
- It combines well with macOS Folder Actions, making it straightforward to set up a drop folder that automatically strips metadata from anything you put in it.
- While this guide focuses on wiping all metadata, ExifTool lets you be very precise — clearing specific fields while preserving others.
- It doesn’t re-encode the image file, so there’s no quality loss.
- It’s free, and no harder to use than the alternatives once it’s installed.
Below are the commands I use most. I’ll start simple and work up to the Folder Actions automation. I’m assuming ExifTool is already installed — if not, here’s a straightforward guide.
Two things to know before you start
- Most of these commands overwrite the input files. ExifTool’s default behavior creates a backup file (with an
_originalsuffix) before modifying anything. The-overwrite_originalflag used throughout suppresses that. So either use the flag and work on copies, or omit it and let ExifTool create backups. - These commands remove the ICC color profile along with everything else. For most web use with sRGB images, that’s fine — browsers assume sRGB when no profile is present. But if you’re sending images to a print lab or press workflow with a non-sRGB profile, you’ll want to use the variant that preserves the color profile. That’s covered below.
Strip metadata from a single image
Navigate to the folder containing the image and run:
exiftool -all= -overwrite_original input.jpg
Replace input.jpg with your filename. This removes all metadata from the file.
Strip metadata from all images in a folder
ExifTool processes entire directories natively — just point it at a folder:
exiftool -all= -overwrite_original /path/to/your/folder/
ExifTool will process every image file in the folder and skip anything it can’t read. No shell loop required.
To strip all metadata except the ICC color profile, use the -- prefix to exclude that tag from the operation:
exiftool -all= --icc_profile:all= -overwrite_original /path/to/your/folder/
-all=removes all metadata.--icc_profile:all=excepts the ICC profile from that operation, leaving it intact. The double-dash prefix means “exclude this tag.”-overwrite_originalmodifies the file in place without creating an_originalbackup.
Save output files to a subfolder
To preserve the originals untouched and write the stripped versions to a subfolder called “Stripped”:
exiftool -all= --icc_profile:all= -o Stripped/ /path/to/your/folder/
ExifTool will create the Stripped subfolder if it doesn’t already exist.
Strip metadata and add copyright back in
You can wipe everything and then write specific fields back in one workflow. The copyright field naming is slightly imperfect across image types and apps, but this covers the main bases. Substitute your own values:
current_year=$(date +"%Y")
exiftool -all= -overwrite_original \
-Copyright="© $current_year David Coleman." \
-Creator="David Coleman" \
-Author="David Coleman" \
-Credit="Photo by David Coleman" \
/path/to/your/folder/
The -all= and the field assignments run in a single pass. The backslashes (\) at the end of each line are shell line-continuation characters — they tell the shell the command continues on the next line.
Automating with macOS Folder Actions
If you do this regularly, setting up a Folder Action is worth the five minutes it takes. Any image dropped into the watched folder gets processed automatically — no terminal required after the initial setup.
- Open Automator and create a new Folder Action.
- Choose New Document, then select Folder Action as the document type.
- Assign it to the folder you want to watch.
- Add a Run Shell Script action.
- Set Pass input to
as arguments. - Set the Shell to
/bin/zsh. - Enter the following script:
- Set Pass input to
for f in "$@"
do
exiftool -all= -overwrite_original "$f"
done
- Save the action with a descriptive name.
Any image dropped into that folder will have its metadata stripped automatically. As with the manual commands, this overwrites the originals in place — so use it on copies unless you’re certain you don’t need the metadata.
From here, the script is easy to extend: add copyright fields back in after stripping, combine with ImageMagick for resizing or watermarking, or extend the Automator action further to email the results or move files to another folder when done.
Alternatives to ExifTool
If you only need to strip metadata occasionally, these GUI options are simpler:
- ImageOptim — free Mac app that strips metadata as part of its image optimization workflow. Easy drag-and-drop interface, no terminal required.
- EXIFPurge — a straightforward Mac App Store app focused specifically on metadata removal. Worth checking current availability before relying on it.


