Scrub Your Files Before They Leave
Photos, PDFs, office documents and videos all carry hidden data about who made them, where and on what. Stop recording it, strip what's there, and check before you share.
Every file carries a second, invisible file inside it. A photo knows the camera, the lens, the time and often the exact GPS coordinates where you stood (its EXIF data). A Word document remembers its author's name, the company licence, the edit history and sometimes deleted text. A PDF can name the software that made it and the person who exported it. A video can carry a location stamp.
None of that shows when you look at the file. All of it goes along when you share it. Some big platforms strip it on upload; email attachments, "original quality" messaging, forums, cloud share links and personal sites usually don't.
1. Stop recording location
The cheapest fix is never writing the coordinates in the first place.
- iOS: Settings → Privacy & Security → Location Services → Camera → Never. When sharing a single photo, tap Options at the top of the share sheet and toggle Location off.
- Android: open the Camera app → Settings → turn off Save location / Location tags.
2. The toolkit
| Tool | Platform | Cleans |
|---|---|---|
| ExifTool | Linux, macOS, Windows (command line) | reads and edits almost any metadata format |
| MAT2 | Linux, macOS, Windows (command line) | images, audio, video, PDFs, office documents, archives, torrents |
| Metadata Cleaner | Linux (Flathub) | a friendly graphical front end for MAT2 |
| ExifEraser | Android | JPEG, PNG and WebP; needs no permissions and reports what it removed |
| Clean Image Metadata shortcut | iOS, macOS | photos, from the share sheet, in batches |
| FFmpeg | Linux, macOS, Windows (command line) | video and audio containers |
3. Photos
On your phone:
- Android: share the image to ExifEraser first, then share the clean copy on. Get it from its GitHub page, which links to its store listings.
- iPhone, iPad and Mac: add the Clean Image Metadata shortcut and run it from the share sheet. If you build your own, make sure Preserve Metadata is unchecked in the Convert step. It removes location, device and lens details, and resets the creation date to when you ran it.
On a computer, with ExifTool:
# install: macOS / Debian & Ubuntu
brew install exiftool
sudo apt install libimage-exiftool-perl
# see what a photo carries, then just its location tags
exiftool photo.jpg
exiftool -gps:all -a -G1 photo.jpg
# remove everything (the image itself is untouched)
exiftool -all= -overwrite_original photo.jpg
# remove only location, keep the rest
exiftool -gps:all= -overwrite_original photo.jpg
# a whole folder, recursively
exiftool -all= -overwrite_original -r ./to-post/
Without
-overwrite_original, ExifTool keeps aphoto.jpg_originalbackup, which still contains the metadata. Delete it.
4. Documents and PDFs
MAT2 is the closest thing to a universal scrubber. Install it from your Linux package manager or PyPI:
mat2 --show report.pdf # see what a file is carrying
mat2 report.pdf # write a cleaned copy (report.cleaned.pdf)
mat2 --inplace report.pdf # clean in place, overwriting the original
On KDE, MAT2 also adds a right-click option to the Dolphin file manager.
In Office, File → Info → Check for Issues → Inspect Document in Word, Excel and PowerPoint finds and removes author names, comments, tracked changes and hidden text (Microsoft's guide). Run it, then export.
5. Video and audio
Phone videos can embed the GPS position they were filmed at. Copy the streams as they are, but drop all container metadata:
ffmpeg -i clip.mp4 -map_metadata -1 -c copy clip-clean.mp4
No re-encoding, so it takes seconds and loses no quality.
6. Verify
Don't assume; check the cleaned copy before you send it.
| Check | Expected |
|---|---|
exiftool -gps:all photo.jpg | no output |
exiftool -Model photo.jpg | no output (after -all=) |
mat2 --show report.cleaned.pdf | nothing left to remove |
| the file itself | looks exactly the same |
7. Redact what's visible
Metadata is the hidden layer; the visible one matters too.
- Never blur to hide text. Blurred and pixelated text can often be recovered. Cover it with a solid, opaque box.
- A black box in a PDF isn't always redaction. Drawing a shape over text can leave the text underneath selectable and searchable. Use a real redaction tool, or flatten the page to an image after covering it, then check by trying to select and copy the area.
- Check the edges of a screenshot for notifications, open tabs, usernames and other windows before you post it.
Clean every file before it goes to a stranger, a public post or an upload form. The file you meant to send is the visible one. Make sure it's the only one.