Skip to content
PDFBetter
Security & cleanup

Sanitize a PDF before you share it

See what your PDF carries besides its pages, tick what to remove, and download a clean copy with a report of everything taken out.

Drop a PDF here

or paste with Ctrl/⌘+V

Runs in your browser — files never leave your device. Free, no account.

PDF · up to 400 MB

Free, no account needed — download as soon as it's done. See plans

What it does

Sanitize PDF, explained

Sanitize PDF checks a file for things that travel with it but don't show on the page: scripts and automatic actions, attachments, metadata, links to outside sites and files, form actions that send data to a server, hidden layers, leftover application data and page thumbnails. It shows how many of each it found and removes the ones you tick. It runs in your browser, so the file you are cleaning never leaves your device.

Read more

Use it before a PDF leaves your organization: a contract going to the other side, a court or tender submission, a client report, a document published on a website. Metadata can reveal the author's name, the software and when the file was edited; a hidden layer can still hold a draft paragraph; an attachment can carry a whole spreadsheet.

Comments and markup are listed but kept unless you tick them, because many people want to keep review notes. Form fields keep working; only the actions that submit data are removed. Links to pages inside the same PDF stay; only links that leave the document go.

Sanitizing removes hidden data, not visible content. To black out words or images on the page, use Redact PDF; to require a password, use Protect PDF after sanitizing.

How to do it

Sanitize a PDF before you share it in 4 steps

  1. 1Sensitive text

  2. 2Mark what to remove

  3. 3Removed from the file

  1. 1

    Add your PDF

    Drop the file. It is opened and inspected in your browser; nothing is uploaded.

  2. 2

    Review what was found

    Each item shows a count: scripts and actions, attachments, metadata entries, external links, submit actions, hidden layers, private data, comments.

  3. 3

    Choose what to remove

    Everything found is ticked except comments. Untick anything you want to keep.

  4. 4

    Download the clean copy

    Download the sanitized PDF and check the report of what was removed and what was kept.

Example

Before and after

Before

A proposal exported from a design app with 2 embedded spreadsheets, author and software metadata, a hidden “internal notes” layer and 14 tracked web links.

After

The same visible pages, with the attachments, metadata, hidden layer and web links gone, and a report listing what was removed.

Settings & formats

What you can control

JavaScript and automatic actions
Document and field scripts, actions that run on open, close or print, launch, media and 3D actions, and XFA form scripts.
Attachments
Embedded files, file-attachment, rich-media and 3D annotations, and files associated with pages, images or comments.
Metadata
Title, author, subject, keywords, creating software and dates, plus XMP metadata anywhere in the file (images included).
External links
Web links and links to other files. Links to pages in the same PDF stay.
Form submit actions
Buttons that send form data to a server. The fields themselves stay.
Hidden layers
Content on optional-content layers that are off by default.
Private app data and thumbnails
Data left by the authoring app (PieceInfo), Web Capture data and embedded page thumbnails.
Comments and markup
Notes, highlights, drawings and stamps. Off by default.

Input

PDF

Output

PDF

Good to know before you start

  • Visible text and images are not changed. Sanitizing is not redaction; use Redact PDF to remove content you can see.
  • Hidden layers are cleaned where their content is drawn on pages and in form XObjects. Layer content inside patterns, annotation appearances or Type 3 fonts is left in place, still hidden. Only a layer's default state counts; layers switched by scripts or set to print-only are not evaluated separately.
  • Removing JavaScript also removes form scripts that format numbers, calculate totals or check input, so totals stop updating on their own.
  • XFA forms (dynamic forms made with LiveCycle or AEM Forms) lose their XFA layer when JavaScript is removed and fall back to their plain form fields; an XFA-only form can then look different or empty.
  • After saving, the file is checked again. Anything still found is reported as not fully removed, never as removed.
  • Text hidden in other ways (white on white, under an image, outside the visible page area) is not detected.
  • The file is rewritten, so any digital signature it carries becomes invalid. Sanitize before signing, not after.
  • Password-protected PDFs must be unlocked first.
If something goes wrong
My form's totals stopped calculating.
Calculations are JavaScript. Run Sanitize again on the original file with JavaScript unticked, or fill the form first and flatten it.
The report says a hidden layer was removed but the pages look the same.
That is expected: the layer was hidden, so nothing visible changes. Its content is gone from the pages and the layer no longer shows in the layers panel.

Sanitize PDF: questions people ask

What does sanitizing a PDF remove?

Whatever you tick of: scripts and automatic actions, attachments, metadata, external links, form submit actions, hidden layers, private application data and thumbnails, and optionally comments. The report shows counts before and after.

Is my file uploaded?

No. The PDF is inspected and cleaned in your browser and never leaves your device.

Will my form fields still work?

Yes. Fields and their values stay. Submit buttons stop sending data, and with JavaScript removed, formatting and calculation scripts stop running.

Does it remove comments?

Only if you tick Comments and markup. Form fields, links inside the document and attachments are handled by their own options.

Is sanitizing the same as redacting?

No. Sanitizing removes data that isn't shown on the page. Redaction removes text and images that are shown. For a document going outside, you often want both: redact first, then sanitize.

Is the metadata gone completely?

The document properties and every XMP metadata packet in the file, including those on images, are removed. The file name is yours to choose: rename the download if the name itself is sensitive.

Do I need an account?

No. This tool is free without an account.