How to Remove Metadata From a PDF
A PDF carries your name, the software you wrote it in, and the moment you created it — and if it contains photos or was built from a map, it can carry coordinates too. Stripping that is not quite the same job as removing photo metadata, because of one thing the PDF format does that JPEG does not: it keeps the old version.
The two commands that actually strip a PDF
The first clears the metadata. The second rewrites the file so the cleared metadata is really gone. Run both:
exiftool -all= document.pdf
qpdf --linearize document.pdf clean.pdfSkipping the second line is the mistake almost everyone makes — here is why it matters. Prefer a GUI? Jump to Windows, Mac, online tools, or verification.
What Metadata a PDF Actually Holds
A PDF stores its metadata in two places, and tools that clean one often ignore the other.
- The document information dictionary. The old mechanism, a simple list of key/value pairs:
Title,Author,Subject,Keywords,Creator,Producer,CreationDate, andModDate.Authoris usually your operating-system account name, filled in without asking you.Creatornames the application you authored in;Producernames whatever wrote the actual PDF bytes. - The XMP metadata stream. An XML packet embedded in the file, and the place modern software prefers. It can hold everything the info dictionary holds, plus edit history, a document identifier that survives across saved revisions, and — when the file came out of a photo application — EXIF properties copied from the source image, GPS among them.
Clearing the Author field in a PDF editor typically rewrites the info dictionary and leaves the XMP packet as it was, so the name you deleted is still in the file — just not where the Properties dialog looks for it. Any tool you trust must handle both.
Why Deleted PDF Metadata Is Usually Still There
PDF supports incremental updates. Rather than rewriting the document, an editor can append the changed objects to the end of the file along with a new cross-reference table pointing at them. Everything a reader displays comes from the newest table; the superseded objects stay in the file, above it, untouched. The format was designed this way so that saving a comment on a 200 MB document does not mean writing 200 MB.
ExifTool writes PDFs this way, and says so plainly: its PDF writer works by appending an incremental update, so the original metadata is not actually removed and can be recovered. It even ships the undo button — exiftool -PDF-update:all= document.pdf deletes the incremental update you just added and returns the file, and its metadata, to the previous state.
So exiftool -all= document.pdf leaves you with a file that every viewer, including ExifTool itself, reports as clean — while your name sits a few kilobytes earlier in the same bytes, one command away from anyone who thinks to look.
The fix is to rewrite the file. qpdfparses the PDF, resolves which objects the current document actually references, and writes a new file containing only those. The superseded info dictionary and the old XMP packet are not referenced by anything any more, so they are not carried across. Ghostscript's pdfwrite device rebuilds the file for the same reason. Either way, the second pass is what does the deleting.
Can a PDF Contain GPS or Location Data?
Yes, though never in the field you would think to check. The document information dictionary has no latitude or longitude entry — there is nowhere in it for coordinates to live. Location reaches a PDF by three other routes.
- Through the XMP packet. Export a geotagged photograph to PDF from an image editor and the EXIF properties, including
exif:GPSLatitudeandexif:GPSLongitude, can be copied into the document's XMP alongside everything else. Nothing in the Properties dialog will show them to you. - Through the pictures inside it.A PDF embeds each image as its own object. Depending on how the producing application built the file, that object may still contain the photo's original EXIF block, coordinates and camera serial number intact. Stripping the document's metadata does not touch metadata belonging to the images within it.
- Because the PDF is a map. The geospatial features standardised in PDF 2.0 (ISO 32000-2), and shipped earlier as an Adobe extension to PDF 1.7, let a page carry a viewport with a geographic coordinate system attached, mapping points on the page to real-world latitude and longitude. This is how the USGS US Topo maps work. It is a feature, not a leak — but if you cropped a screenshot out of one, the georeferencing may have come along.
To see coordinates that came in with an embedded image, ExifTool has to be told to descend into the file:
# -ee walks embedded images and documents, not just the PDF itself
exiftool -ee -a -G1 document.pdf
# Just the GPS: prints nothing if there is none
exiftool -ee -gps:all document.pdfIf that finds GPS, the surest fix is to strip the photographs before they go into the document — how location gets into a photo in the first place covers where those coordinates come from and how to stop your camera writing them.
How to Remove PDF Metadata on Windows
Windows has no built-in PDF metadata remover. The Remove Properties and Personal Informationlink in a file's Properties dialog only works for formats Windows has a writable property handler for — JPEG and TIFF do; PDF normally does not, and the link is greyed out. Our Windows EXIF removal guide covers that dialog for the formats where it does work.
ExifTool and qpdf, the reliable route
# Install ExifTool (winget ships with Windows 11 and current Windows 10)
winget install -e --id OliverBetz.ExifTool
# Clear the info dictionary and the XMP packet
exiftool -all= document.pdf
# Rewrite the file so the cleared metadata is not recoverable
qpdf --linearize document.pdf clean.pdfReopen PowerShell after installing so it picks up the new PATH. qpdf is distributed as a Windows build on its releases page; unzip it and either add the bin folder to your PATH or call qpdf.exe by full path. Delete the document.pdf_original backup ExifTool leaves behind — it still has everything.
A whole folder at once
exiftool -all= -overwrite_original -r -ext pdf C:\Docs
Get-ChildItem C:\Docs -Recurse -Filter *.pdf | ForEach-Object {
qpdf --linearize --replace-input $_.FullName
}--replace-input rewrites each PDF in place. -ext pdf keeps ExifTool from wandering into any images sharing the folder.
Adobe Acrobat Pro, if you have it
File → Properties → Description lets you clear Title, Author, Subject, and Keywords, and Additional Metadata reaches the XMP packet behind them. But the tool you want is Tools → Redact → Sanitize Document, which removes metadata along with embedded scripts, hidden layers, attachments, and deleted-but-still-present content, then saves a rebuilt file. Sanitizing is not reversible and it is not in the free Acrobat Reader.
Before it becomes a PDF
If you still have the Word document, clean it there and the export starts clean: File → Info → Check for Issues → Inspect Document, then remove Document Properties and Personal Information. Save as PDF afterwards. This also catches tracked changes and comments, which survive a PDF export and which no metadata stripper will find, because by then they are page content.
How to Remove PDF Metadata on Mac
Preview shows you a PDF's metadata under Tools → Show Inspectorand will not let you edit any of it. Neither will Finder's Get Info. macOS has no built-in editor for this, the way it has none for photo EXIF beyond the Photos app's location toggle.
ExifTool and qpdf, via Homebrew
brew install exiftool qpdf
exiftool -all= document.pdf
qpdf --linearize document.pdf clean.pdf
# Or a folder of them, rewritten in place
exiftool -all= -overwrite_original -r -ext pdf ~/Documents/Contracts
find ~/Documents/Contracts -name '*.pdf' \
-exec qpdf --linearize --replace-input {} \;The same two passes, for the same reason: ExifTool clears, qpdf rewrites.
Print to PDF, when you cannot install anything
Open the document, press ⌘ + P, and choose Save as PDFfrom the PDF menu. macOS regenerates the document through its own rendering pipeline, so the file you get is a new one, described by macOS's metadata rather than the original's.
You pay for it. Bookmarks, links, form fields, and any text layer added by OCR may not survive, and the print job can put the original filename into the new document's Title. It is a reasonable move on a locked-down machine, and one to check afterwards rather than trust.
Removing PDF Metadata Online
Search for this and you will find a dozen sites offering to strip your PDF in the browser. Read what they mean by that. Most upload the document to a server, process it there, and give you a download link — which means the file you were trying to make anonymous has been handed, in full, to a company you had not heard of ten seconds earlier, along with your IP address and the time you sent it.
If the metadata bothers you enough to remove it, the document probably should not be uploaded to remove it. That is the whole argument, and it does not have an answer. Use one of the local methods above for anything you would not post publicly. If you do use an online service, prefer one that says explicitly that processing happens in your browser, check that the page keeps working after you disconnect from the network, and assume anything you upload is retained.
The same reasoning drives our own tool: it runs entirely in your browser and nothing is transmitted. It reads and strips images, not PDFs — which makes it the right tool for the step before this one, cleaning photographs so the document you build from them starts with nothing to remove.
Which Method Should You Use?
| Method | Unrecoverable? | Keeps links & forms? | Best for |
|---|---|---|---|
| ExifTool alone | No — appended as an update | Yes | Tidying fields on a document nobody will examine. |
| ExifTool + qpdf | Yes | Yes | Anything sensitive, and any batch. The default. |
| Acrobat Pro Sanitize | Yes | Scripts and attachments go | A GUI, and hidden content beyond metadata. |
| Print to PDF (Mac) | Yes | No | No install rights, simple documents. |
| Online stripper | Varies | Varies | Documents you would be content to publish anyway. |
Verify the Metadata Is Gone
Reopening the file and finding an empty Properties dialog proves nothing here — that dialog reads the current cross-reference table, which is exactly the part an incremental update replaces. Check the bytes.
# Every tag ExifTool finds, including inside embedded images
exiftool -ee -a -G1 -s clean.pdf
# Did an incremental update survive? A clean rewrite has no PDF-update group
exiftool -G1 -a clean.pdf | grep PDF-update
# The blunt check: is your name anywhere in the raw file?
strings clean.pdf | grep -i 'yourname\|Author\|CreationDate'A properly rewritten PDF still reports a few lines — file name, size, MIME type, page count, PDF version, and a Producer naming whatever rebuilt it. Those are structural, and qpdf naming itself as the producer is not a leak. What should be absent is Author, Creator, CreationDate, ModDate, the entire [XMP] group, and any GPS tag.
If strings finds your name in a file whose Properties dialog is empty, you cleared the metadata without rewriting the file. Run the qpdf pass.
Cleaning the photos first?
Drop an image into our viewer to see the GPS, camera, and timestamp data it would carry into your document — and strip it before you place it. Runs locally in your browser; nothing is uploaded.
Open the EXIF ViewerRelated Guides
Remove Photo Metadata (All Platforms)
The same job for images, on Windows, Mac, Linux, and mobile.
Strip Metadata Before Sharing Online
Which platforms strip metadata, which leak it, and the workflow to clean files before you upload.
Remove Metadata From a Video
The ffmpeg equivalent for MP4, MOV, and AVI files.
Photo Privacy Guide
What your files reveal about you, and a checklist for sharing safely.
GPS Data in Photos
Where the coordinates in your files come from, and how to stop writing them.
Remove EXIF Data on Windows
File Explorer, PowerShell, and the flaw in the built-in remover.
Frequently Asked Questions
Can PDFs contain location data?
Yes, by three routes. A PDF exported from a photo application can copy the source image's EXIF GPS properties into its XMP packet. Images embedded in the document may keep their own EXIF, coordinates included. And PDF 2.0 has genuine geospatial features — a page viewport with a geographic coordinate system attached — which is how mapping PDFs such as USGS US Topo sheets work. The document information dictionary has no GPS field, so nothing appears in the Properties dialog either way. Check with exiftool -ee -gps:all document.pdf.
Does exiftool -all= fully remove PDF metadata?
No. ExifTool writes PDFs by appending an incremental update, so the original metadata stays in the file and can be recovered — ExifTool documents this, and exiftool -PDF-update:all= document.pdf undoes the strip to prove it. Follow the strip with a rewrite: qpdf --linearize document.pdf clean.pdf. qpdf writes out only the objects the current document references, so the old metadata is not carried over.
How do I remove the author name from a PDF?
The name usually lives in two places: the Author entry of the document information dictionary, and dc:creator in the XMP packet. Clearing one in a PDF editor often leaves the other. Run exiftool -all= document.pdf, which clears both, then qpdf --linearize document.pdf clean.pdf to make the removal permanent. In Acrobat Pro, use Sanitize Document rather than editing the Description tab.
Can I change a PDF's creation date instead of deleting it?
Yes: exiftool -CreateDate="2024:01:15 09:00:00" -ModifyDate="2024:01:15 09:00:00" document.pdf. The XMP packet keeps its own copies of both dates, and ExifTool updates them together. The file's own filesystem timestamps are separate again and are not part of the PDF. The same rewrite caveat applies — the old dates remain in the file until you run it through qpdf.
Is it safe to remove PDF metadata with an online tool?
Only for documents you would be willing to publish. Most online strippers upload the file to a server to process it, so a document you are anonymising is transmitted, in full and un-anonymised, to a third party. If the metadata is worth removing, remove it locally with ExifTool and qpdf, or with Acrobat Pro's Sanitize Document.
Does stripping metadata remove redacted or hidden text?
No, and confusing the two is how documents get un-redacted. A black rectangle drawn over a name is page content sitting on top of other page content; the text underneath is still selectable. Metadata tools do not touch page content. Use a real redaction tool that deletes the underlying text, then strip the metadata afterwards, because redacting adds its own.
Why does my cleaned PDF still list a Producer?
Because something produced it. When qpdf or Ghostscript rewrites a file, it names itself in the Producer field of the new document. That tells a reader which library wrote the bytes, not who you are or when you started writing. If you want it gone too, strip once more after the rewrite — though the next tool to touch the file will put its own name back.
Check an image before it goes into the document
See every EXIF field, GPS coordinates included, in your browser — no upload, no install.
Open Photo Metadata Viewer