Strip Hidden Metadata and Scripts from a PDF
Strip metadata, embedded JavaScript, attachments and annotations — leaving just the pages.
Select a PDF
Click to choose, or drop a file here
You can also paste (Ctrl+V / Cmd+V)
Most tools run entirely on your device
Advertisement
About sanitizing a PDF
A PDF can carry more than its visible pages: document metadata (author, software, timestamps), embedded JavaScript that can run when the file is opened, attached files buried inside it, and comments or annotations left by previous editors — none of which are visible just from reading the document. Sanitizing strips all of that in one pass, leaving only the page content behind, which matters before sharing a file outside your organization or archiving a clean version.
The tool runs entirely with pdf-lib in your browser: it walks the document's internal structure, removes the metadata dictionary, deletes any embedded JavaScript actions, strips file attachments, and clears annotation objects, then rewrites the PDF from what's left. The page content itself — text, images, layout — is untouched; sanitizing changes what's hidden inside the file, not what's printed on it.
Supported files
Accepts and produces a PDF. The output is smaller or the same size, never larger, since sanitizing only removes data.
Is my file uploaded?
No. The whole process runs in your browser with pdf-lib — nothing is uploaded, which is worth noting for a tool whose entire purpose is removing hidden data before you share a file.
How to Sanitize PDF
- 1
Add your PDF
Drop it in.
- 2
Sanitize
Metadata, embedded JavaScript, attachments, form fields and annotations are removed.
- 3
Download
Save the clean PDF — page content unchanged.
Sanitize PDF — frequently asked questions
Is this the same as flatten?+
Related but broader. Flatten merges layers/annotations into the page; Sanitize also strips metadata, JavaScript and attachments.
Will the text still be selectable?+
Yes — page content is untouched. Only metadata and interactive/hidden parts are removed.
Is there a free way to strip hidden metadata and scripts from a PDF?+
Yes — this tool strips metadata, scripts and attachments entirely in your browser, free and with nothing uploaded.
Does it change the file size much?+
Usually it shrinks slightly, since metadata, scripts and attachments are all removed — but the reduction is typically small compared to compressing the page images.
Do you upload my files to a server?+
No — every tool here processes your files entirely on your device, and nothing is uploaded to a server. The only exception is the AI tools, which send the extracted text (not the file) to Claude to do their work.
Is there a file size limit?+
There's no artificial limit we impose, but since processing happens in your browser, very large files (500+ MB or 1,000+ pages) are limited by your device's memory rather than by us.
Advertisement