🛡️ Sanitize PDF

Strip hidden content, JavaScript, embedded files, metadata, annotations, and links from your PDF. Everything runs in your browser — your file never leaves your device.

Select or drop your PDF file here

or

document.pdf

Loading…

Deep structure scan runs on your device. Nothing is uploaded — the file and its hidden data stay in your browser.
Scan Report
Scanning PDF structure…
Analyzing document…
Sanitization Preset
What to Remove
Sanitizing… 0%
Your PDF never leaves your browser. 100% private and secure.

How to Sanitize a PDF

1

Upload PDF

Drop your PDF above — the tool automatically scans its hidden structure.

2

Choose What to Strip

Pick a preset (Recommended, Aggressive, Custom) or tick individual options.

3

Sanitize & Download

Click "Sanitize & Download" — you get a clean, stripped PDF instantly.

Frequently Asked Questions

What's the difference between Sanitize PDF and Remove Metadata?

Remove Metadata focuses on the document's info dictionary and XMP stream — a narrow, surgical clean. Sanitize PDF goes much deeper: it also strips JavaScript, auto-execute actions, embedded files, annotations, links, form widgets, and bookmarks. Use Sanitize when you want a truly clean file — for example, before submitting a legal document or publishing a PDF publicly.

What does the "risk score" mean?

The risk score estimates how much hidden content the PDF contains. It's calculated from the number of JavaScript actions, embedded files, metadata fields, annotations, and links found. A higher score means more privacy-relevant content is present — but the Recommended preset will clean all of the invisible items in one pass.

Will sanitizing change how my PDF looks?

With the Recommended preset — no. All the items it removes (JavaScript, embedded files, metadata, XMP) are invisible to readers. The visible text, images, and layout are untouched.

The Aggressive preset will visually affect your PDF: comments disappear, links become unclickable, form fields become non-fillable, and bookmarks vanish. Only use Aggressive when you actually want those things removed.

Can JavaScript in a PDF really harm me?

Yes. PDFs support JavaScript at multiple levels — as the document opens (OpenAction), when the user interacts with a field, when the user prints, and more. Malicious PDFs can use these to exfiltrate data, open URLs, or (in vulnerable readers) exploit bugs. Most modern PDF readers run JS in a sandbox, but Adobe Acrobat's JS engine is very capable. Removing all JS is the safest option when you don't control the source.

Why does the tool ask whether to remove form fields?

Form widgets (text boxes, checkboxes, dropdowns) are technically "annotation" objects, so removing annotations would destroy them too. We keep form fields separate so you can choose whether to preserve or strip them. If your PDF has form fields you want to keep fillable, leave the "Form Fields" checkbox off.

Does sanitizing remove PDF passwords or encryption?

No. Sanitizing only removes content, not encryption. If your PDF is password-protected, use Unlock PDF first, then sanitize the unlocked copy. Conversely, if you want to add a password back after sanitizing, use Protect PDF.

Is my PDF uploaded to a server?

No. Everything happens in your browser using pdf-lib. The scan, the sanitization, and the download all happen locally. You can verify this by opening DevTools → Network tab — you'll see zero outbound requests beyond the initial page load.

PDF Sanitized!

Done!