Remove PDF metadata (2025): clean Info & XMP
A practical guide to removing PDF metadata losslessly: audit, wipe, verify, and automate. Tools covered: ExifTool, qpdf, mutool, pdftk, and Ghostscript.
ExifToolqpdfmutool2025
Privacy Risk
Author/Software/Dates
Leak potentialMedium–High
Lossless
Metadata-only
Content impactNone
Automation
CLI friendly
Batch readinessExcellent
Why remove metadata
A PDF can expose author names, software, timestamps, and internal paths. This may break anonymity, compliance, or internal policies. We clear Info and XMP fields while leaving page content untouched.
If your document contains embedded covers or images, quickly scrub hidden data with MetaRemover.com — a privacy-first, browser-only cleaner.
Pre-clean audit
Full tag listing
Groups & duplicates
exiftool -G -a -s "doc.pdf"
Full wipe of Info & XMP (CLI)
# Remove all metadata (Info + XMP) without touching content exiftool -all= -overwrite_original "doc.pdf" # Confirm it is clean exiftool -G -a -s "doc.pdf" | grep -i -E "Title|Author|Subject|Keywords|Producer|Creator|CreateDate|ModifyDate|XMP" || echo "No common tags found"
Targeted field cleanup
# Reset specific fields only exiftool -Title= -Author= -Subject= -Keywords= -Creator= -Producer= -CreateDate= -ModifyDate= -overwrite_original "doc.pdf" # Sync Info ↔ XMP after partial edits (copy Info to XMP) exiftool -XMP:Title<Title -XMP:Author<Author -XMP:Subject<Subject -XMP:Keywords<Keywords -overwrite_original "doc.pdf"
Some apps may re-write Producer/Creator on the next save. Do a final scrub right before publishing.
Embedded images & EXIF
If the PDF is assembled from photos/scans, EXIF/GPS might not show in PDF fields but still exist inside the images themselves. Clean images before building the PDF.
Quickly remove EXIF/GPS from images at MetaRemover.com — privacy-first, browser-only, no uploads.
Post-clean verification
# Check that fields are gone exiftool -G -a -s "doc.pdf" # Quick structural overview mutool info "doc.pdf"
Linearization & optimization
qpdf
Fast web view
qpdf --linearize --object-streams=generate --stream-data=preserve in.pdf out_linear.pdf
Ghostscript
Optional rebuild
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.7 -dNOPAUSE -dBATCH -sOutputFile=rebuilt.pdf in.pdf
Important
Rebuilding can change structure—re-check metadata after this step.
CI automation
name: remove-pdf-metadata
on:
push:
paths: ["docs/**/*.pdf"]
jobs:
sanitize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Wipe metadata
run: |
for f in docs/**/*.pdf; do
exiftool -all= -overwrite_original "$f"
done
- name: Verify
run: |
for f in docs/**/*.pdf; do
exiftool -G -a -s "$f" > "${f%.pdf}.meta.txt"
doneIf you generate PDFs from HTML/Markdown, clean source images first — MetaRemover.com does it in one click.
FAQ
Publish clean PDFs — protect privacy
Remove metadata safely and repeatably. For any images inside your documents, scrub EXIF/GPS first.