How to Remove Metadata From a PDF (2026 Guide for Mac, Windows, and CLI)
How to Remove Metadata From a PDF (2026 Guide for Mac, Windows, and CLI)
A PDF you send over email or upload to a public site is rarely just a flat document. It is a container that carries metadata — sometimes a lot of it. Author and creator names, the version of Word or InDesign used, the original filename on someone's drive, edit timestamps, custom company tags, hidden text from earlier drafts, embedded fonts that reveal license keys, and (in rare cases) a JavaScript layer that pings a tracking server when opened.
Most of this is harmless on internal documents. It is a problem on contracts shared with counterparties, leaked documents shared with journalists, marketplace listings, and anything you publish under a pseudonym. This guide shows you how to remove metadata from a PDF properly on macOS, Windows, command line, and online — and how to verify the result.
What kind of metadata does a PDF actually carry?
PDFs carry several layers of metadata, and different tools strip different layers.
| Metadata layer | What it contains | How sensitive |
|---|---|---|
| Document Info Dictionary | Title, Author, Subject, Keywords, Creator (app), Producer (PDF library), CreationDate, ModDate | Often reveals identity |
| XMP metadata | Same fields as Doc Info plus extensible Adobe XML — copyright, edit history, asset relationships | Can include full revision IDs |
| Annotations | Comments, highlights, sticky notes — each carries author + timestamp | Reveals the reviewer's name |
| Form field data | If it's a fillable form, the entered values | Often very sensitive |
| Bookmarks / Outline | Document structure — usually fine | Low |
| Hidden text and layers | Earlier draft text covered by white boxes; layers turned off but still in the file | High — major redaction failures live here |
| Embedded files | Other documents attached inside the PDF | Can include source materials |
| JavaScript | Scripts that run on open | Can phone home, can be malicious |
| Digital signatures | Cryptographic signatures and signer certificates | Often legitimate, sometimes leaks identity |
| C2PA Content Credentials | Adobe's content provenance chain | Intentionally identifying |
When people search how to remove metadata from a PDF, they usually mean the Document Info + XMP layers. A real privacy strip needs to handle annotations, form data, hidden text, and JavaScript too. Tools differ widely in what they actually clean.
Method 1: macOS — Preview, exiftool, and qpdf
Option A — Preview.app (built-in, partial):
- Open the PDF in Preview.
- Tools menu → Show Inspector → click the i tab.
- Edit Title, Author, Subject, Keywords directly. Save.
This handles only the Doc Info dictionary. XMP, annotations, form data, and hidden text remain. Not a full strip.
Option B — Preview "Print to PDF" trick (effective):
- Open the PDF in Preview.
- File → Export → Print (Cmd+P).
- In the print dialog, click PDF dropdown at the bottom-left → Save as PDF.
- Save with a new name.
This rebuilds the PDF from rendered output. Result: Doc Info, XMP, annotations, form data, and JavaScript are gone. Hidden text and white-box redactions are flattened (genuinely removed). Bookmarks and the original structure are lost — which is sometimes a feature, sometimes a bug.
Option C — Compresto + ExifTool (CLI, complete):
Install ExifTool via Homebrew:
brew install exiftool
exiftool -all= document.pdf
The -all= strips Doc Info and XMP completely. To verify:
exiftool document.pdf | grep -iE "author|title|creator|subject|date"
A clean PDF returns nothing.
For a more thorough strip including JavaScript, embedded files, and form data, pair with qpdf:
brew install qpdf
qpdf --linearize --object-streams=disable input.pdf clean.pdf
exiftool -all= clean.pdf
The qpdf step rebuilds the PDF object stream, which removes orphan objects (often the source of leaked metadata).
Option D — Acrobat Pro (most thorough for legal):
- Open in Acrobat Pro.
- Tools → Redact → Sanitize Document → Sanitize.
- Or: Document menu → Properties → Description tab → clear fields manually.
- Or: Tools → Protect → Remove Hidden Information → review checklist → Remove.
The Sanitize Document action is Acrobat's nuclear option. It removes Doc Info, XMP, annotations, form data, hidden text, JavaScript, embedded files, and digital signatures in one pass. Use it for any PDF leaving your firm or going to a counterparty.
Method 2: Windows
Option A — File Explorer (built-in, basic):
- Right-click the PDF → Properties.
- Click the Details tab.
- Click Remove Properties and Personal Information.
- Choose to create a copy with all properties removed.
This handles Doc Info but misses XMP, annotations, and hidden text. Acceptable for casual use, not for legal or journalism.
Option B — Microsoft Edge / Acrobat Reader print-to-PDF:
- Open the PDF in Edge or Acrobat Reader.
- Print → printer Microsoft Print to PDF (or "Save as PDF" in Edge).
- Save with a new name.
Same effect as the Preview print trick on Mac — strips most metadata layers via re-render.
Option C — Adobe Acrobat Pro (Sanitize Document):
Same as the Mac instructions above. The Sanitize Document feature is the gold standard if your firm has an Acrobat Pro license.
Option D — qpdf + exiftool (free, cross-platform):
Install qpdf and exiftool from their official Windows builds, then run from PowerShell:
qpdf --linearize --object-streams=disable input.pdf clean.pdf
exiftool -all= clean.pdf
Method 3: Online tools
For one-off use without installing software:
- PDF24 Tools (tools.pdf24.org/en/remove-pdf-metadata) — free, drag-and-drop, removes Doc Info and XMP. Files retained briefly for processing.
- Smallpdf (smallpdf.com) — paid for batch, free for one PDF/day. Good UI.
- PDFGear — free, runs locally on Windows/Mac plus has a web version.
- Compresto Tools — Compresto's PDF compressor optionally strips metadata during compression.
Privacy warning on online tools: unless the tool says "in-browser" or "WebAssembly," your PDF is uploaded to their server. For a contract or anything sensitive, avoid online tools and use a local CLI. The whole point of stripping metadata is reducing exposure — sending the file to an unknown server defeats it.
Method 4: Microsoft Word / Google Docs (export-time)
If you are creating a PDF from Word or Google Docs, strip at export time.
Word for Mac/Windows:
- Save the document.
- Click File → Info → Inspect Document → Inspect.
- Review what is found — Document Properties, Author, Comments, Hidden Text, Custom XML — and click Remove All for each category.
- File → Export → Create PDF.
The Inspect Document feature catches most layers Word can write into a PDF, including comments, tracked changes, and revision IDs.
Google Docs:
Google Docs' PDF export carries fewer metadata layers than Word's, but still includes the document title and your Google account name as author. Before exporting:
- Rename the document so the title is generic.
- File → Download → PDF Document.
- Run the resulting PDF through
exiftool -all=to strip the residual XMP.
Method 5: Command-line one-liner
If you remove metadata from PDFs frequently and want a single repeatable command:
exiftool -all= -overwrite_original *.pdf
This processes a directory in place. For maximum cleanliness, layer qpdf:
for f in *.pdf; do
qpdf --linearize --object-streams=disable "$f" "clean-$f"
exiftool -all= -overwrite_original "clean-$f"
done
Use this in a build pipeline before publishing PDFs to a public site.
What about scanned PDFs?
A scanned PDF (a photo of a document, OCR'd) often carries:
- The scanner make and model (Canon, Fujitsu ScanSnap, Epson)
- The scanning software (Adobe Scan, Apple Notes, ScanSnap Manager)
- Per-page timestamps
- An embedded JPEG of each page — which has its own EXIF if it came from a phone camera
Strip the PDF metadata as above, but also consider the embedded JPEGs. ExifTool with -all= strips embedded JPEG EXIF too. If you scanned with your phone, this is critical — the JPEG EXIF will include your phone's GPS, the time you took the scan, and your phone model.
For pre-scan privacy on phone scanners:
- iOS Notes / Files: scan strips EXIF and GPS automatically.
- Android Google Drive scan: same.
- Adobe Scan: includes editor app and timestamp.
- Manual phone photo + OCR: includes full EXIF including GPS.
Hidden text and redaction failures
The single most embarrassing metadata leak is fake redaction: white boxes drawn over text in Word or Acrobat that are actually transparent layers. The text is still there, copy-pasteable, searchable, and visible to anyone who selects it.
Real redaction:
- Acrobat Pro: Tools → Redact → mark sensitive text → Apply Redactions → Save (rewrites the PDF without the redacted text).
- Open-source:
pdftotextto extract text from your PDF and check what is actually present, then re-export from source after editing the source. - Print-to-PDF: forces the text layer to be flattened; redactions you drew in the source become opaque.
Fake redaction (DO NOT USE):
- Word: dragging a black rectangle over text. Text remains.
- Preview: Markup → Rectangle filled with black. Text remains.
- Adobe Reader (free): drawing tools cover text but do not remove it.
If you have a PDF with covered-but-not-redacted text and want to verify, run:
pdftotext suspicious.pdf - | less
If your "redacted" text comes out in plain readable form, the redaction failed.
Verifying the strip worked
After you remove metadata from a PDF, verify with multiple tools.
Doc Info + XMP check:
exiftool clean.pdf | grep -iE "author|title|creator|subject|date|software"
Should return only basic file info (size, MIME type), no identifying fields.
Hidden text check:
pdftotext clean.pdf - | wc -l
Compare line count to the visible text. If hidden text is present, the line count will be higher than the visible content.
Annotations check:
qpdf --json --json-keys=pages clean.pdf | grep -i annot
Should return no annotation entries unless you intentionally kept comments.
Online double-check:
Drop into the Compresto Image Metadata Extractor or any general-purpose EXIF viewer that handles PDFs.
Combining metadata removal with PDF compression
A typical PDF created from Word or InDesign is 3–10 MB and stuffed with metadata. Stripping metadata + compressing reduces size and exposure. Run:
- Compress the PDF — see compress PDF, compress PDF Mac free, or reduce PDF size without losing quality.
- Strip metadata with ExifTool or Acrobat Sanitize.
- Verify with
exiftoolandpdftotext.
Compresto's PDF preset can chain compress + strip in a single drag. For extreme cases (legal, leaks), do it manually with qpdf + exiftool + Acrobat Sanitize and verify each step.
If you also handle photos, the same logic applies — see remove metadata from photo and remove EXIF data for the image equivalents.
FAQ
Why does my PDF have my name on it? Word, InDesign, and Acrobat write the logged-in user's name into the Author field of the PDF Document Info dictionary. To prevent this in Word, change Word's user info under Word → Preferences → User Information before creating the PDF.
Can I remove metadata from a PDF without losing the document?
Yes. ExifTool's -all= only strips metadata, not content. Acrobat Sanitize is more aggressive and can remove form data and annotations — read the dialog before clicking.
Do online PDF metadata removers work? The good ones (PDF24, Smallpdf, PDFGear) work, but they require uploading your file. For sensitive content, use ExifTool, qpdf, or Acrobat locally.
Does redaction in Acrobat Pro remove metadata? Acrobat's Redact removes the redacted text from the PDF stream. Acrobat's separate Sanitize Document removes metadata. They are different actions — run both for a complete clean.
Is the metadata visible to readers? Most readers (Preview, Acrobat Reader, Edge, Chrome) show Title and Author when you open a document. Other metadata (XMP, software, edit history) is invisible until someone runs ExifTool or another viewer. Either way, it is in the file.
What if I want to keep some metadata, like copyright? Use ExifTool's selective syntax:
exiftool -all= -XMP-dc:Rights="© 2026 Your Name" document.pdf
This strips everything, then re-adds only the rights field. Useful for publishers who want anonymity for the author but a clear copyright marker.
TL;DR
- Quick clean: macOS Preview Print → Save as PDF, OR Windows print to Microsoft Print to PDF. Strips most metadata via re-render.
- Complete clean:
exiftool -all= file.pdf— works on Mac, Windows, Linux. Free. - Legal-grade clean: Acrobat Pro → Tools → Redact → Sanitize Document. Removes everything: Doc Info, XMP, annotations, form data, hidden text, JavaScript.
- Avoid fake redaction — black boxes drawn over text do not remove text. Use Acrobat's Redact tool or rebuild the source.
- Verify with
exiftool,pdftotext, andqpdf --jsonbefore publishing. - Pair with PDF compression for the smallest, cleanest output.
A PDF carries more about you than the visible content suggests. Spend 30 seconds running it through a metadata stripper before it leaves your machine — and remember the photo equivalent for any images you embed.