PDF · runs locally
Clean a PDF's metadata and active content
Strip document metadata, JavaScript actions, embedded files and optional annotations before sharing.
- 1Drop the PDF
The document is inspected in the browser.
- 2Choose what to remove
Metadata, scripts and actions, attachments, and optionally every annotation.
- 3Download the clean copy
The pages are not rasterised, so text stays selectable.
What this tool does
Sanitizing walks the PDF object graph with pdf-lib: it clears the info dictionary and XMP metadata, removes OpenAction and additional-action entries, drops JavaScript name trees and embedded-file name trees, and removes file-attachment annotations.
The page content streams are left alone. That is deliberate: re-rendering would destroy selectable text and vector art. If you need a guaranteed flat copy, convert the pages to images instead.
Questions people actually ask
Does this make a malicious PDF safe?
No. It removes common metadata and active-content hooks, but it is not an antivirus engine and cannot prove a file is harmless.
Will my text and images change?
No. The page content is not re-rendered. Only metadata and the selected active objects are removed.
Why remove annotations?
Comments, highlights, links and form widgets are annotations. Removing all of them gives a flat page-only copy, but form fields stop working.
What about encrypted PDFs?
Unlock the file first. Sanitizing an encrypted document without decrypting it would produce a broken copy.