There’s more in a photo file than the pixels you can see. A JPEG, HEIC, TIFF, or PNG may carry GPS coordinates, the date and time the picture was taken, the camera model, editing software, and other embedded details. If you’re about to publish or send the original image, stripping that information can help prevent an accidental disclosure of your location or device details.
The Short Answer
ExifTool is the most reliable way to remove EXIF metadata from a photo. Install it, make a backup of the image, then run:
exiftool -all= -overwrite_original photo.jpgThat command removes EXIF, GPS, IPTC, XMP, and most other metadata embedded in the file. Windows has a basic removal tool built into File Explorer. On macOS, Preview can remove GPS coordinates from supported images.
One caution: work on a copy if you can. Wiping all metadata may also remove things you meant to keep, including copyright fields, captions, capture dates, color profiles, and orientation instructions.
What EXIF Metadata Actually Is
EXIF stands for Exchangeable Image File Format. It’s a collection of fields stored inside an image, usually added by a camera or phone to record details about how and when the picture was captured.
| Metadata type | Example | Privacy concern |
|---|---|---|
| GPS | Latitude, longitude, altitude | Can reveal where a photo was taken |
| Device | Phone or camera model | Identifies equipment in use |
| Date and time | Original capture timestamp | Can reveal routines or travel dates |
| Software | Editor and application version | Exposes parts of an editing workflow |
| Author fields | Name, copyright, comments | May contain personal information |
People often use “EXIF” as a catch-all for embedded image information. Technically, though, the same file may also contain IPTC, XMP, ICC, or metadata written by a particular application.
Removing Photo Metadata in Windows
Using File Explorer
You can remove common personal properties in Windows without installing anything else:
- Find the image in File Explorer, right-click it, and choose Properties.
- Open the Details tab.
- Click Remove Properties and Personal Information.
- For the safer choice, select Create a copy with all possible properties removed.
- Click OK.
You can instead select Remove the following properties from this file, then choose individual fields. The catch is that File Explorer may not spot every XMP, IPTC, or application-specific field. If removal needs to be as complete as possible, use ExifTool.
Removing Location Data in macOS
Preview can strip GPS coordinates from many photo formats it supports. The steps are fairly short:
- Open the image in Preview.
- Choose Tools, then Show Inspector.
- Open the information panel and select the GPS tab, if one appears.
- Click Remove Location Info.
- Save the image, or export it as a separate copy.
No GPS tab? Preview probably didn’t find compatible location data. This option is aimed at location information rather than every metadata block in the file, so ExifTool is the better choice for a broader cleanup.
Removing All Metadata with ExifTool
ExifTool runs on Windows, macOS, and Linux, and it works with a wide range of image formats.
Installing ExifTool
On macOS, using Homebrew:
brew install exiftoolFor Debian or Ubuntu:
sudo apt update
sudo apt install libimage-exiftool-perlOn Fedora:
sudo dnf install perl-Image-ExifToolWindows users can get the official executable from the ExifTool website. Rename exiftool(-k).exe to exiftool.exe, then put it in the folder that holds the images or in a directory included in PATH.
Cleaning One Photo
exiftool -all= photo.jpgBy default, ExifTool keeps the untouched file as photo.jpg_original. Check that the cleaned image opens properly. Once you’re satisfied, you can delete that backup by hand.
If you don’t want ExifTool to create its own backup copy, use:
exiftool -all= -overwrite_original photo.jpgCleaning a Folder of Photos
exiftool -all= -overwrite_original -ext jpg -ext jpeg -ext png /path/to/photosTo include subfolders, add -r:
exiftool -r -all= -overwrite_original -ext jpg -ext jpeg -ext png /path/to/photosIf a path contains spaces, wrap the whole path in quotation marks.
Removing Metadata on Linux with mat2
Linux users have another option: Metadata Anonymisation Toolkit 2, generally packaged as mat2. On Debian or Ubuntu, run:
sudo apt install mat2
mat2 photo.jpgmat2 normally leaves the source file alone and creates a cleaned version, such as photo.cleaned.jpg. It supports several document and media formats as well, which can be handy if the folder contains more than photographs.
Checking That the Metadata Is Gone
To inspect the cleaned file, run ExifTool without any modification options:
exiftool -G1 -a -s photo.jpgThe output won’t be completely empty. You’ll still see basic file and image properties, including dimensions, encoding type, and file size. Those values are needed to describe or decode the file, and they aren’t the same thing as personal EXIF fields.
For a GPS-only check, use:
exiftool -gps:all photo.jpgIf nothing appears, ExifTool found no standard GPS tags.
Mistakes That Can Cause Trouble
- Editing your only copy: Keep the original until you’ve confirmed that the cleaned version opens and displays correctly.
- Removing only the properties Windows shows: File Explorer can leave unsupported metadata blocks behind.
- Assuming every screenshot is clean: A screenshot usually drops the camera’s original EXIF data, but the new file may still include software or creation details.
- Sending private images to an unknown metadata website: With a local tool, the original file never has to be transferred to a third-party server.
- Forgetting about orientation: Some cameras record rotation in metadata. Remove it, and an older image viewer may show the picture sideways.
Before You Share a Photo
- Make a separate sharing copy rather than changing the archival original.
- Remove the metadata locally with File Explorer, Preview, ExifTool, or mat2.
- Open the cleaned copy and check its colors and orientation.
- Run ExifTool to look for any GPS, EXIF, IPTC, or XMP fields that remain.
- Keep in mind that metadata removal can’t hide what’s visible in the picture itself, such as faces, street addresses, badges, reflections, or landmarks.