Hidden Data in PDFs: What Your Files Reveal and How to Remove It
Author names, software, edit history, comments, attachments and text under black boxes: what PDFs leak, real examples, and how to clean a file before you share it.
NewKitApp 9 min read
A PDF looks like a sealed, finished page. Underneath, it can carry a surprising amount of extra information: who made it, on what computer, with what software, when it was edited, what reviewers said about it, and sometimes entire files nobody meant to send. Occasionally it even carries text that looks deleted but isn't.
Most of the time this hidden data is harmless. Sometimes it's embarrassing: a CV whose author field shows a former employer, a proposal whose comments reveal the internal price discussion. And sometimes it's serious: court filings and government reports have leaked redacted names because the "redaction" was a black rectangle drawn on top of text that was still there.
This guide lists what a PDF can hide, shows how to check your own files, and explains how to clean them before they leave your hands.
What a PDF can carry beyond the visible page
Document metadata
Every PDF can store properties about itself:
- Title (shown in browser tabs and search results)
- Author (often the name of the computer's user account)
- Subject and Keywords
- Creator (the application used, such as "Microsoft Word for Microsoft 365")
- Producer (the software that wrote the PDF, such as "macOS Quartz PDFContext" or "Adobe PDF Library 23.1")
- Creation and modification dates, down to the second and often with a time zone
This lives in the document information dictionary. Many PDFs also hold an XMP metadata stream, an XML block that duplicates these fields and can add more: editing history, document IDs that link the PDF back to the source file, and custom fields added by publishing systems.
Comments and markup
Sticky notes, highlights, strike-throughs, drawn shapes and reviewer replies are stored as annotations. A PDF reader may hide them if its comment panel is closed, but they're still in the file. Anyone who opens the comments panel sees the whole thread, with names and timestamps.
Embedded files
PDFs can contain attachments: complete files stored inside. A report might carry the spreadsheet its charts came from, including tabs the author never meant to share. Attachments show up only in a reader's attachments panel, which most people never open.
Form data
Form fields store values separately from the page. A form that looks blank in one viewer might contain old answers that another viewer shows.
JavaScript and actions
PDFs can run scripts when opened, when a page is viewed or when a field changes. Legitimate uses include form calculations. Malicious ones include exploiting vulnerable readers or "phoning home" to report that someone opened the file.
Hidden layers
Optional content groups (layers) can be switched off in the viewer. A PDF exported from a design or CAD tool may contain layers with draft notes, alternative versions or technical annotations that aren't visible by default.
Old versions of content
PDF supports incremental saving: when some editors save changes, they append new versions of objects to the end of the file and leave the old ones in place. Tools that dig into the file structure can recover earlier text.
Text under shapes
When someone "redacts" by drawing a black rectangle over text, the rectangle sits on top of the page content. The text remains in the file. Select across the black box and copy, and the hidden words paste out.
Real-world examples
Leaks from PDF hidden data are not hypothetical. Over the past two decades:
- Government agencies in several countries have published reports where redacted names and details could be copied out from under black boxes.
- Court filings in high-profile cases have exposed confidential settlement figures and witness details the same way.
- Companies have sent proposals where the author field or comments revealed the name of a competitor's employee who had drafted it, or internal notes about pricing strategy.
- Journalists have identified anonymous document sources from metadata such as printer serial numbers, user names and edit timestamps.
In nearly every case the visible document was fine. The leak was in the layer nobody looked at.
How to check a PDF yourself
Before you share a document, take two minutes to look.
- Open document properties. In most readers, press Ctrl+D (Cmd+D on Mac) or find File, Properties. Look at Title, Author, Subject, Keywords, Creator and Producer.
- Open the comments panel. Look for any comments, highlights or markup.
- Open the attachments panel. Usually a paperclip icon in the sidebar.
- Check for layers. A layers panel appears in Adobe Reader and some other readers if the file has optional content.
- Test any redactions. Click and drag across a black box, copy, and paste into a text editor. If words appear, the redaction failed.
You can also read and edit the metadata fields directly in Edit PDF Metadata, which shows every standard property in one form.
How to clean a PDF
Option 1: sanitize
Sanitize PDF removes hidden data while keeping the visible pages the same. You choose what to strip:
- Metadata: both the document information fields and the XMP stream
- JavaScript and automatic actions: open actions, page actions, field scripts
- Embedded files: attachments in the document and file-attachment annotations
- Links: clickable links, if you don't want them
- Comments and markup: notes, highlights, drawings from review rounds
After cleaning, the tool reports what it found and removed, so you can see whether there was anything there in the first place. The process runs in your browser; the document isn't uploaded.
Option 2: rebuild from pages
Tools that copy pages into a fresh document, such as Extract PDF Pages or merging, leave behind document-level items and old incremental versions. Extracting all pages into a new file is a quick way to drop history. Combine it with sanitizing for the most thorough clean that keeps text selectable.
Option 3: flatten to images
For the strongest guarantee, convert every page to an image. Flatten PDF with the "whole page" option renders each page as a picture and builds a new PDF from those pictures. Everything that isn't visible disappears: hidden text, layers, form data, comments, scripts, old versions. The downside is that the text is no longer selectable or searchable, and the file may grow.
This is the right choice when you've covered text with black boxes and need certainty that it's gone.
Redaction done properly
Proper redaction means removing the content, not covering it. Here are two reliable routes:
Route A: a dedicated redaction tool. Adobe Acrobat Pro's Redact feature and similar tools delete the text and image data under the marked area, then optionally sanitize the document. This keeps the rest of the document as selectable text.
Route B: cover, then flatten. Draw opaque boxes over the sensitive text in any PDF editor, save, then run the file through Flatten PDF with the whole-page option. The pages become images; the hidden text no longer exists in the output. Check the result by trying to select text: nothing should be selectable.
Whichever route you use, also redact the same information wherever else it appears: file names, metadata, bookmarks, headers and footers, and the text of other pages.
A cleaning routine before you share
- Decide what the recipient needs. Send only the relevant pages; use Extract PDF Pages.
- Check and fix the metadata. Set a neutral title and author, or clear them, with Edit PDF Metadata.
- Sanitize. Remove metadata, scripts, attachments and comments with Sanitize PDF.
- Redact properly if any visible content must be hidden: cover, then flatten.
- Rename the file. File names often contain client names, draft numbers or dates you didn't mean to reveal:
Final-v7-for-Acme-DO-NOT-SEND.pdfsays a lot. - Check the result. Open properties, comments and attachments again, and test that redacted areas contain no text.
What sanitizing doesn't change
Cleaning hidden data doesn't remove information that's visible on the page. If your name appears in the footer of every page, it stays. If a scanned page shows a fax header with a phone number, it stays. Read the visible pages with the recipient's eyes as well.
It also doesn't alter the file name or the email you send it with, and it can't remove copies of the original that already exist elsewhere.
Special cases
Documents exported from Word
Word documents carry their own hidden data: tracked changes, comments, hidden text, document properties. When you export to PDF, some of it can come along, especially comments if "Document showing markup" is selected. Before exporting, use Word's Inspect Document feature (File, Info, Check for Issues) to remove hidden data at the source, then accept or reject all tracked changes.
Scans
A scanned page is an image, so it doesn't carry text layers. But the PDF can still hold metadata from the scanner or app: device model, sometimes the user name. Sanitize scans too.
Forms
If you're sending a completed form, flatten it with Flatten PDF (form fields mode) so the values become part of the page. That also removes the possibility of a viewer showing old values that were overwritten.
Files you received
When forwarding a PDF someone else sent you, check it before passing it on. Their comments and metadata travel with it.
A checklist for teams
If your organisation publishes documents or sends them to clients, a shared checklist prevents most leaks. Pin something like this where people prepare files:
- Only the pages the recipient needs are included
- Title is set; Author shows the organisation, not a person's account name
- Comments, highlights and review notes are removed
- No embedded attachments, unless intended
- No scripts in documents that aren't interactive forms
- Redactions done by removing content (cover and flatten, or a redaction tool)
- Redactions tested by trying to select and copy the hidden text
- File name is neutral and doesn't reveal draft status or other clients
- Forms are flattened
- Final file reviewed once in a PDF reader with all panels open
Make one person responsible for the final check on anything going to the press, a court, a regulator or a public website.
Common questions
Does "Print to PDF" remove hidden data? Often, because it creates a new PDF from the rendered page. But it may still add metadata from your system (your user name as author, for example), and it can turn text into images depending on the driver. Check the result.
Does compressing a PDF remove metadata? Not necessarily. Compression targets images. Sanitize separately.
Will sanitizing break my form? Removing JavaScript stops calculations and validations from working. If the recipient needs to fill and calculate the form, leave JavaScript in and remove only metadata and comments.
Is metadata removal enough to stay anonymous? No. Writing style, content, visible details, and the channel you send it through can all identify you. Metadata is one layer of many.
Can a cleaned PDF be traced back to its source? Without metadata and document IDs, it's much harder. But anything visible in the content can still point to its origin.
How hidden data accumulates
It helps to see how a single document picks up hidden data on its way to you. A proposal starts in Word on a laptop whose user account is "jsmith-old". Two colleagues add comments. The finance team pastes in a chart from a spreadsheet, which Word embeds with its source data. Someone exports to PDF with "include comments" ticked. A manager opens the PDF in a reader, highlights a paragraph, saves, and the reader appends the change as an incremental update. Then a designer adds the logo using a design tool, which stamps its own Producer field and an XMP block with a document ID.
By the time the PDF reaches the client, it carries an outdated author name, review comments, possibly the embedded chart data, two versions of a page, and a trail of software names. Nobody did anything wrong. Each step added a little, and nobody looked at the whole.
Summary
PDFs can carry author names, software details, timestamps, comments, attachments, scripts, hidden layers, earlier versions and text under black boxes. Check documents before sharing by looking at properties, comments and attachments, and by testing redactions. Clean them with a sanitizer that removes metadata, scripts and attachments; rebuild or extract pages to drop history; and flatten to images when you need certainty that hidden text is gone. Two minutes of checking before you hit send prevents the kind of leak that's impossible to take back.