🛡️ 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…
How to Sanitize a PDF
Upload PDF
Drop your PDF above — the tool automatically scans its hidden structure.
Choose What to Strip
Pick a preset (Recommended, Aggressive, Custom) or tick individual options.
Sanitize & Download
Click "Sanitize & Download" — you get a clean, stripped PDF instantly.
Frequently Asked Questions
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.
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.
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.
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.
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.
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.
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.