If you’ve ever posted photos online and wondered what secret details were in it, then you’re contemplating metadata. The majority of modern-day files, particularly videos and images, are stored with additional information, such as device model, timestamps and edit history, GPS location thumbnails, as well as identifiers that help link the files back to you.
If your aim is simple and straightforward – get rid of all metadata metadata ExifTool is among the most reliable methods to accomplish this. This guide will show you exactly what commands to use that are used, explains what they accomplish and outlines the most common mistakes that lead to metadata to stay.
What exactly does “metadata” means in practice
Metadata refers to “data about data.” In real-world documents, it is typically:
- EXIF EXIF: camera information, lens information, GPS, shutter speed Date taken
- XMP editing history tags faces regions, creator information
- IPTC captions Keywords, copyright (common in workflows for journalists)
- ICC profiles: color management information
- Previews or thumbnails embedded in HTML0 tiny versions of the image which may still be contaminated with remnants of the original image.
- Metadata of the file system files created and modified times (not contained in the file)
When someone says “remove all metadata,” they usually mean delete everything in the container for files (EXIF, XMP, IPTC and so on.). ExifTool does this extremely effectively.
Things you need to know prior to stripping metadata
1.) Always make copies (unless you’re sure)
ExifTool is able to modify files. It is useful but it’s irreversible if commit an error.
2.) Metadata removal can limit the functionality
A few metadata are helpful:
- direction (how the image should be rotated)
- color profile (ICC)
- timestamps to sort
If you delete everything the apps could display colours differently or images could appear to rotate in older viewers. You can remove everything, but it’s important to know the pros and cons.
3.) “All metadata” does not necessarily mean “anonymous in every possible way”
Even if you delete metadata:
- The pixels are able to reveal the information (faces reflections, faces, location clues)
- the file might still be identified by the content match
- cloud platforms can include their own metadata following upload
However, removing embedded metadata is a major step to ensure privacy.
Installation of ExifTool (quick summary)
ExifTool is an application for command line. The installation method is dependent on the operating system you are running.
- Windows typically you need to download an ExifTool package and then run it from a folder located in PATH
- macOS is commonly installed using package managers
- Linux is typically accessible via distro repositories
After installation it is generally executed by exiftool.
Verify the metadata is present (recommended)
Before you remove anything, make sure to check the contents of the container:
Exiftool yourfile.jpg
If you’re looking for a more clear overview of the most important metadata groups:
exiftool -G1 -a -s yourfile.jpg
G1displays that the entire group (EXIF, XMP, IPTC and more.)-ashows duplicate tags too-sutilizes the short output format
This is how you can confirm that you have removed the items you wanted to remove.
Take all metadata out of one single file
The most well-known and efficient method:
exiftool. All= yourfile.jpg
What does it do:
all=removes all metadata tags ExifTool can write or remove in the specified file
Important behavior:
- By default, ExifTool creates a backup copy like
yourfile.jpg_original
If you’d like to erase metadata and replace it with your original files (no backup):
exiftool -all= -overwrite_original yourfile.jpg
Eliminate all metadata from the whole folder (batch)
To delete metadata from each supported file within the folder:
exiftool -all= -overwrite_original /path/to/folder
Include recursion (subfolders as well):
exiftool -r -all= -overwrite_original /path/to/folder
This is the most efficient “clean everything in this directory” method.
Remove metadata from certain type of files only
Sometimes you need only images or videos.
exiftool -r -ext jpg -ext jpeg -ext png -all= -overwrite_original /path/to/folder
For videos:
exiftool -r –ext mp4 exiftool -ext mov -all= overwrite_original path/to/folder
Maintain a color profile or orientation (optional but beneficial)
If you remove everything you can end up losing ICC color profiles and orientation information. Some prefer to keep these.
Keep your ICC profile, but eliminate everything else
exiftool.all= -tagsfromfile @ -icc_profile overwrite_original yourfile.jpg
Maintain a sense of direction (rarely required, but occasionally useful)
exiftool – all= -tagsfromfile @ the orientation of your file - overwrite original yourfile.jpg
If you’re looking for the most privacy, then you would not like to keep any. For professional workflows maintaining ICC is a good idea to ensure consistency of color and shades.
Removing GPS data is the only option (if you do not wish to complete wipe)
If you are only concerned about your location:
exiftool -gps:all= -overwrite_original yourfile.jpg
This takes out GPS fields, but it keeps the remainder.
Verify that metadata is gone
After stripping, check:
exiftool -G1 -a -s yourfile.jpg
If the output is not empty or close to empty, you have succeeded.
Note: Some formats display minimal information about the container. This is not unusual. The aim is to remove any personal or descriptive data, but not altering the structure of the file.
Common errors that can leave behind metadata
Error 1: Forgetting XMP sidecar files
In certain workflows (Lightroom and professional editing) metadata is saved separately .xmp sidecar files in addition to the photo. The removal of metadata in the image will not delete the sidecar file.
Solution: Also remove or edit .xmp files if they are present.
Second mistake: Assuming “remove metadata” also changes timestamps of the file system
ExifTool eliminates embedded metadata. Your OS might still display the date and time of creation or modification. These aren’t always recorded within the file.
If you want to manage timestamps, this is an additional stage (OS-level applications).
3. Uploading to platforms which re-add metadata
Certain services will include their own metadata following uploading, or maintain an original copy internal. Make sure you test your process from beginning to end.
Error 4 Don’t use the -overwrite_original option or sharing incorrect file
ExifTool typically stores backups that end with the initial. Sometimes, people upload the backup as well as leak metadata.
Fix:
- Use
-overwrite_original, or - It is important to share only the clean file as well as safely delete backups.
Best practice workflows that works for “clean and share”
A simple safe workflow:
- Copy files to the “to-share” folder
- Strip metadata recursively
- Verify at a minimum one output file
- Share files from the cleaned folder only.
Commands:
exiftool -r -all= -overwrite_original /path/to/to-share exiftool -G1 -a -s /path/to/to-share/somefile.jpg
FAQ
Does ExifTool take metadata off of PNG files?
Yes, it is possible to remove various kinds of metadata from PNG (like chunks of text) however, PNG metadata is distinct from JPEGs that are heavy on EXIF. Always confirm the metadata using exiftool –G1 –a –s.
Are there ways to use ExifTool delete metadata in PDF documents or documents?
ExifTool is able to handle a variety of file formats such as PDFs, however “remove everything” effectiveness varies according to the format. The exact all= strategy is usually effective but you must verify the output and ensure whether the file is still functioning properly.
Can this decrease the size of files?
Sometimes, yes. The removal of the embedded thumbnails and previews or large XMP blocks can decrease the size. However, this isn’t guaranteed.
Do you think all= the best choice to protect your privacy?
For the vast majority of privacy-related situations Yes. It’s the simplest method that is reliable: eliminate everything ExifTool can find in the container.
If you can tell me the type of file you’re removing (JPG/PNG/MP4/PDF) and if you’d like to save ICC colour profiles I’ll be able to offer the most appropriate commands for your specific situation.