Skip to content

Metadata Hygiene

Almost every file you create carries metadata — data about the data. A photo records the camera, the exact GPS coordinates, and the timestamp. A Word document records the author name, organization, edit history, and sometimes earlier deleted text. A PDF embeds the software that produced it. None of this is visible when you glance at the file, and all of it can deanonymize you, locate you, or contradict a cover story.

Metadata hygiene is the practice of knowing what your files reveal and stripping it before you share them.

SourceWhat it can reveal
Photos / video (EXIF, XMP, IPTC)GPS location, date/time, device make & serial, thumbnails of the original (un-cropped) image
Office documents (Word, Excel, PowerPoint)Author, organization, template path, revision history, comments, tracked changes
PDFsProducing software, author, creation/modification timestamps, sometimes layered original text under “redactions”
AudioEncoder, tags, sometimes device identifiers
Any file (filesystem)Created/modified timestamps, owner, on some systems extended attributes

Phone and camera photos embed EXIF tags. The most dangerous is the GPS geotag, which pins the photo to a precise latitude/longitude — enough to find a home or a safehouse. Cropping or blurring the visible image does not remove the embedded GPS data, and some formats also store an un-edited thumbnail of the original frame.

Inspect and strip EXIF with ExifTool:

Terminal window
exiftool photo.jpg # show all metadata
exiftool -gps:all= photo.jpg # remove only GPS tags
exiftool -all= photo.jpg # remove ALL metadata (writes photo.jpg, backs up original)

Office files are ZIP archives of XML and retain far more than the visible text — author, comments, tracked changes, and prior revisions.

  • Microsoft Office: File → Info → Check for Issues → Inspect Document, then remove document properties and personal information.
  • LibreOffice: Tools → Options → Security → “Remove personal information on saving.”
  • PDF: re-export or “sanitize” rather than trusting the source app. Adobe Acrobat has Redact → Sanitize Document; open-source options are below.

The classic failure is “redacting” a document by drawing a black box over text — the text is still selectable underneath. Redaction must remove the underlying content, not merely cover it. Flatten and re-rasterize, or use a tool that deletes the content stream. The U.S. NSA’s redaction guidance is a concise, authoritative reference.

Sharing happens over the network, which leaks its own metadata:

  • Referrer headers tell the destination which page you came from. Set a strict referrer policy (Referrer-Policy: no-referrer / strict-origin-when-cross-origin) on sites you control, and prefer browsers that minimize referrers by default.
  • Upload behavior varies by platform. Most large social networks re-encode images and strip EXIF on upload — but messaging apps, email attachments, file shares, and “original quality” uploads frequently do not. Never assume a platform scrubs for you; scrub first.
ToolUse
ExifToolRead/write metadata for images, PDFs, audio, video
mat2 (Metadata Anonymisation Toolkit)One-command stripping across many formats; mat2 file.pdf writes a cleaned copy
Platform “remove properties”Built-in, good for a quick pass but less thorough than the above
Terminal window
mat2 report.pdf # produces report.cleaned.pdf with metadata removed
mat2 --show photo.jpg # list what would be removed