Skip to main content

Sanitize a PDF

Before publishing or sharing a PDF, remove the author and other metadata, JavaScript, automatic actions and hidden attachments, without changing how the pages look.

  • Export
Automate

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Your files are processed locally in your browser and are never sent to our servers.

Drop your file here

Recommended size: up to 100 MB

Was this tool useful?

How does this tool work?

Sanitizing a PDF removes invisible or active elements the reader does not need: details about the author and the original software, JavaScript and actions that run when the file opens, files hidden inside the document. It is a clean-up to do before publishing a PDF on a website, passing it to a third party or uploading it to a platform. It runs in your browser and does not change the visible content of the pages.

Three clean-ups are offered, all checked by default. Remove metadata clears the title, author, subject, keywords, creator application and producer, and removes the XMP stream that often duplicates them. Remove JavaScript and automatic actions deletes scripts, the document’s open action and actions triggered by events or program launches.

Remove embedded attachments deletes the files attached at document level, which a reader does not always show. Text, images and layout are left untouched: the document looks exactly as before.

Sanitizing reduces information leaks and automatic behaviour, but it is not an antivirus: it does not check whether a file is malicious and does not fix flaws in a PDF reader. To see what a document contains before cleaning it, use Analyze PDF information.

How to use this tool

  1. Import the PDF

    Choose the document to clean before sharing it.

  2. Choose the clean-ups

    Leave all three boxes checked, or uncheck the ones you want to keep (attachments, for instance).

  3. Download the sanitized copy

    The new PDF looks the same, without the removed elements.

Use cases

Publish a document on a website

Remove the author’s name, software details and scripts before offering a PDF as a public download.

Forward a file you received

Neutralise the automatic actions of a PDF of unknown origin before passing it on.

Upload to a strict platform

Some portals reject PDFs containing JavaScript or attachments: clean them before uploading.

Examples

Report exported from a word processor

When you open the document properties in a reader, the Author, Producer and Creator fields are empty, and the script no longer runs.

Input

report.pdf with author “Mary Smith”, an XMP stream and a JavaScript open action; all three boxes checked

Result

Copy without author or producer, without XMP and without open action; identical pages

Tips and best practices

  • Sanitize last if you chain several operations: other tools may rewrite some properties.
  • Uncheck Remove embedded attachments if the PDF deliberately carries useful files (e-invoices, appendices).
  • A form that calculates totals often uses JavaScript: its calculations will stop working after the clean-up.

Frequently asked questions

Is the page content changed?

No. Text, images and layout stay identical; only the checked elements are removed from the file structure.

Which metadata is removed?

Title, author, subject, keywords, creator and producer, plus the document’s XMP metadata stream.

Does this tool replace an antivirus?

No. It removes known active mechanisms but does not detect malicious files. Open doubtful documents with care.

My form calculates amounts. What will happen?

Automatic calculations usually rely on JavaScript; once the script is removed, the fields can still be filled in but no longer calculate.

Do electronic signatures remain valid?

Rewriting the file generally invalidates an existing digital signature. Sanitize before signing, never after.

Is the document analysed on a server?

No. The clean-up runs in your browser, and the PDF never leaves your device.

Related tools

Tools similar or complementary to this one.

Works well with

Edit or remove common PDF metadata directly in your browser.

PDF & documentsUse this tool

Inspect pages, size, version, metadata, forms, annotations and active elements in a PDF.

PDF & documentsUse this tool

Permanently hide sensitive areas by rebuilding the document.

PDF & documentsUse this tool
TutorialBest practicesBeginner

How to securely redact a PDF before sharing it

Learn why covering text is not enough, how secure PDF redaction removes sensitive information and why sanitization matters before sharing.

10 September 20262 min
GuideBest practicesBeginner

PDF: understand the format and manage documents properly

Understand how PDF files are structured, the difference between native and scanned PDFs, and the right operations for merging, reorganizing, converting or completing documents.

29 August 20263 min