PDF Metadata Remover
Published Updated
Strip the document information fields, dates, custom entries and XMP packets from a PDF, with a list of what was found. Title, author and the rest are removed from the file, not blanked, and comment authors are cleared, while attached files and picture bytes are not touched.
What is cleared and what stays
A test PDF was built with every field filled in, then cleaned by the page's code in Google Chrome 156. The structure follows the Document Information Dictionary and the XML Metadata. Information stored in a file about the file: in a PDF, fields such as title, author, the program that made it and the creation date; in a photo, the camera settings and capture time. It travels with the file unless something removes it. Read the guide streams that ISO 32000-1, in Adobe's public copy, describes in clauses 14.3.3 and 14.3.2.
| Item | After cleaning |
|---|---|
| Title, Author, Subject, Keywords, Creator, Producer | Removed |
| CreationDate and ModDate | Removed |
| A custom entry, and the Trapped key | Removed |
| XMP packet on the catalog | Removed |
| XMP packet on a page, and on other objects | Removed |
| Annotation author and dates on comments and markup (the T, M and CreationDate entries) | Removed (form field names are kept) |
| Embedded file attachment | Still there |
Why two places hold metadata
The same chapter calls metadata streams, added in PDF 1.4, the preferred method now, and the information dictionary the older one. Many files carry both, which is why the page clears both and reports whether each was present. Clearing only the old dictionary would leave any XMP packet, and the author inside it, in place.
Places a name or date can remain after cleaning
Metadata is only one place a PDF can hold a name or a date. A generated one-page file got a different marker text in each place listed below, and one incremental update: ISO 32000-1, 7.5.6 says those changes “shall be appended to the end of the file, leaving its original contents intact”, so an older information dictionary with another author name stayed in its bytes. Measured in Google Chrome 157 with the site's own PDF Metadata Remover; every object of the download, streams decompressed, was searched for each marker. Firefox 155 and Playwright's WebKit build (not the Safari app) gave the same results.
| Where the marker sat | In the cleaned file |
|---|---|
| The older information dictionary, from before the incremental update | Gone |
| Title, author, creator, producer, a custom entry and the dates of the current information dictionary; XMP on the document, the page and an image; the comment's author and date | Gone |
| The file identifier (/ID) in the trailer | Kept: both values unchanged |
| Application data (PieceInfo) on the document and the page, with its LastModified date, and the page's own LastModified date | Kept, dates included |
| Comment text, a form field value and a bookmark title | Kept |
| An attached file's name, description and content | Kept |
| A document-level script, a page-label prefix and a layer name | Kept |
| Text drawn on the page | Kept |
pdf-lib saves the cleaned document as a new file, and the older revision's author name was found nowhere in it. In ISO 32000-1, sections 14.4 and 14.5, the first of the two identifier values is “a permanent identifier” of the file, and the cleaned copy carries the same two values as the original. The same pages describe PieceInfo as a dictionary that “may be used to hold private conforming product data”.
Cleaning a PDF
Step 1
Add the PDF
One unencrypted PDF. The page reads its metadata first and lists every field that held a value.
Step 2
Check the found list
Title, author, subject, keywords, creator and producer appear with their text. Flags show whether XMP, custom fields, dates and page-level XMP were present.
Step 3
Download the cleaned PDF
The file is saved as the original name plus -clean.pdf. The original on your disk is not changed.
Worth doing yourself afterwards
- Search the page text for names and file paths.
- Delete comments and attachments you do not mean to share.
- To compare the cleaned file against the original, use Compare PDFs, and to flatten forms first, Flatten PDF.
Metadata questions
Is the author inside the page text removed?
No. Only metadata is cleared. A name typed on page one, a footer or a signature line stays. The author name and date stored on a comment or highlight are removed; the comment text itself stays.
Are attachments and embedded images cleaned?
An attached file stayed in the test PDF, along with its own description. The page removes XMP packets attached to images and other objects, but by reading the code it does not rewrite picture bytes, so camera data inside an embedded JPEG would remain.
Are the fields blanked or removed?
Removed. The six standard fields are deleted from the file, as the ISO 32000-1 text says an unknown entry should be omitted rather than given an empty string. When nothing is left, the information dictionary is dropped too. Viewers show a blank either way.
Does it change how the pages look?
No page content is edited. The file is loaded and saved again, and objects no longer reachable are dropped. The test file shrank from 2,191 to 1,149 bytes.
Does it work on a signed or encrypted PDF?
A password-protected file is refused with a message. Saving again rewrites the file, so any digital signature in it should be treated as no longer valid.
Is the PDF uploaded?
No. The pdf-lib library edits the file inside the page and the download is built locally.
Does the cleaned PDF keep the original file ID?
Yes. The file identifier in the trailer (/ID) is neither in the information dictionary nor in XMP, and both of its values came out unchanged, in Chrome 157, Firefox 155 and the WebKit build.
Are older versions saved inside the PDF removed too?
In the test file, yes. An incremental update had left an earlier information dictionary with a different author name in the raw bytes; after cleaning, that name was found nowhere in the file.
Can a name or date still be found after cleaning?
Yes, outside the metadata. In the marker test the comment text, a form value, a bookmark title, an attachment's name and content, a layer name, a page-label prefix, a document script and application data (PieceInfo) with its LastModified dates all stayed.
Related guide
How to compress, merge and convert PDFs without uploading them. The guide explains the two places a PDF stores its author and dates, and why both have to be cleared.