Remove hidden data from a PDF before you share it
A PDF can carry more than its pages: the author's name, the program and dates it was made with, whole files attached to it, and scripts. None of it shows when you read the document, and all of it goes along when you send it. Here's what to look for and how to remove it.
Updated November 2, 2026
Open Sanitize PDFWhat a PDF can carry besides its pages
| Document properties | Title, author, subject, keywords, the program that made the file and the dates it was created and changed. The author is often a full name or a login. |
|---|---|
| XMP metadata | A second, longer copy of the properties. Files saved from some design and office programs also record their editing history here. |
| Attachments | Whole files embedded in the PDF, such as a spreadsheet behind a chart. Readers list them in a side panel that's easy to miss. |
| JavaScript and actions | Code or actions that run when the file opens or a page is shown. Rarely needed in a document you're sending out. |
| Hidden layers | Optional content switched off for viewing, such as an earlier draft of a drawing or internal notes. |
| Page thumbnails | Small previews of each page stored in the file. If the page was edited after they were made, they still show the old version. |
| Private app data | Data that design and office apps store in the PDF for their own use, which can include earlier versions of the content. |
| Hidden text | Text that's on the page but not drawn, so you can't see it but anyone can copy or search it. |
| Comments and form data | Notes, replies and filled-in fields. They're visible in a comments or forms panel, but people forget they're there. |
Redact first, then sanitize
Sanitizing leaves what the pages show alone. If the pages themselves show something you can’t share, such as a name or an account number, remove it with Redact PDF first. A black box drawn in an ordinary editor only covers the text; Redact PDF deletes it from the file. Then sanitize the redacted copy.
Remove hidden data
- Open Sanitize PDF and add the file.
- Under What to remove, seven kinds are selected by default: Metadata, JavaScript and actions, Attachments, Hidden layers, Page thumbnails, Private app data and Hidden text. Links, Form fields, and Comments and markup are off, because removing them changes what people see or can do with the file. Select them if the recipient shouldn't get them either.
- Select Remove hidden data and read the report: each kind it removed, with a count, and the kinds it checked and didn't find. The tool then scans the new file again for each kind you selected.
- Download the clean copy and keep your original separately.
To clean a set of files, use Batch process with a Remove hidden data step. Its Prepare for sharing recipe removes hidden data and then compresses each file.
Hidden text removal keeps the invisible text that OCR places over a scan, so a searchable scan stays searchable. Text colored to match the background, covered by a shape or image, or inside an embedded graphic (form XObject) isn’t detected; look over the pages yourself.
Before you send it
- Rename the file. The file name travels with it and often says more than the metadata, such as "draft v3 with legal comments".
- Open the clean copy and look through every page. Sanitizing doesn't change what's printed on the page.
- To see what a file still carries, open it in the editor. The sidebar's Properties tab shows the title, author and the apps that made it, and the Attachments tab lists embedded files.
- If the file needs a password, add it last with Protect PDF. Sanitizing a protected file asks for its password and saves a copy without one.
- Any change to a file breaks a certificate-based digital signature in it, so sanitize before signing, not after.
Where your file goes
Sanitizing runs in your browser tab, so the file you’re cleaning isn’t uploaded to be cleaned. See Privacy for details.