---
title: "Remove hidden data from PDF: free, no upload | Docsi"
description: "Remove hidden data from a PDF before you send it: scripts, auto-run actions, attachments, links, comments and properties, each one a separate choice."
url: https://docsi.si/tools/sanitize-pdf/
updated: 2026-11-19
---

[Docsi](https://docsi.si/) / [Tools](https://docsi.si/tools/) / [Security and signatures](https://docsi.si/tools/#secure)

# Remove hidden data from PDF

Strip what a PDF carries besides its pages: scripts, things that run on opening, attachments, links, properties, comments, forms, switched-off layers and bookmarks. Every item is its own choice.

Security

Up to 2 GB a file.

**Runs on**: Your device

**Files uploaded**: None

**Price**: Free

**Account**: Not needed

**Works offline**: Yes

**Updated**: 19 November 2026

A PDF can carry much more than its pages. Scripts can run when it opens, other files can ride along as attachments, and comments, links and properties can say more than the document does. This tool removes those items, and each one is its own switch. By default it removes scripts, actions that run on their own, attachments, links, comments and the document's properties. Bookmarks, form fields, switched-off layers and the file identifier stay unless you choose to remove them. The result lists what was taken out.

## How to sanitize a PDF

1. **Add your PDF above** Drop it on the box or choose it from your device. It is opened locally and is not uploaded.
2. **Set the options** Adjust annotations, auto actions, bookmarks and more, or keep the defaults.
3. **Download the result** It appears on this page when the work is done. Nothing to install, no account, no watermark.

## When to use remove hidden data from PDF

**Sending a file outside the company**: Before a document goes to a client, remove reviewers' comments, internal links and any spreadsheet someone attached for reference. The pages arrive as they look and nothing else travels with them.

**Opening a PDF from someone you do not know**: A file that runs scripts or opens web addresses on its own is a reason to be careful. Removing scripts and automatic actions gives you a copy that only shows its pages.

**Publishing a document online**: Bookmarks can name sections that were cut, and links can carry tracking parameters. Turn on bookmark removal along with the defaults before you post a public copy.

## Tips for a better result

**Comments switch also removes links and fields**: Removing annotations takes every annotation off the pages, which includes links and the visible parts of form fields. To keep comments but drop links, turn off annotations and leave links on: then only links go.

**Keep forms when someone must fill it in**: Form fields stay by default. Turn the forms option on only for a copy nobody needs to fill in, or run Flatten PDF to keep the typed values as part of the page.

**Check pages after removing layers**: Removing layers deletes the document's layer settings; it does not rewrite the drawings on the page. Look through the result afterwards, and use Redact PDF for anything that must be destroyed rather than hidden.

**Run the scanner before and after**: The PDF privacy risk scanner lists what the file carries, with the tool that fixes each item. Run it first to choose the switches, and again on the result to confirm.

## Options

**Annotationsdefault true**: Also remove annotations and comments (default true).

**Auto actionsdefault true**: Remove anything that runs by itself when the file opens or when you turn a page.

**Bookmarksdefault false**: Remove bookmarks and the outline. They can name sections that were cut from the document.

**Embedded filesdefault true**: Remove other files hidden inside this PDF as attachments.

**File iddefault false**: Remove the hidden identifier that links this copy to others made from the same original.

**Formsdefault false**: Also remove form fields (default false; flattening arrives with pdf.flatten).

**Javascriptdefault true**: Remove scripts: code a PDF can run when you open it, click something or type in a field.

**Layersdefault false**: Remove switched-off layers. A layer can hold text or drawings that are hidden in the reader yet still sitting in the file for anyone who looks; they are deleted from the pages, then the layer list goes.

**Linksdefault true**: Remove links that open a web address or another program.

**Metadatadefault true**: Remove the document's properties: author, title, the software that made it, dates.

## What it costs and what it takes

Nothing. No account, no watermark, no trial and no daily limit.

- **Files up to 2 GB** As big as a browser tab can open. On a phone, past about 200 MB it may run out of memory; a computer copes better.
- **Up to 2,000 files at a time** They are worked through one after another, on your device.
- **Up to 20,000 pages a document** Long documents take longer, and nothing is uploaded while they do.

## Why it runs on your device

Contracts, payslips, IDs and invoices should not sit on somebody else's server. Docsi's engine is compiled to WebAssembly and runs inside your browser tab, so the file stays where it is, there is no upload wait, and the tool keeps working offline.

In the app you can also type what you want: “sanitize”, “remove hidden data”, “remove javascript”, “remove attachments”, “clean up hidden”.

## Questions

### How do I remove JavaScript from a PDF?

Leave Remove scripts on, which is the default. Document-level scripts are removed, and so are script and launch actions anywhere in the file; actions that open a web address go with Remove links. Keep Remove automatic actions on as well, so nothing runs when the file opens or a page turns.

### Does it remove attachments?

Yes, by default. Files embedded in the PDF as attachments are removed. If you turn attachment removal off but keep scripts removal on, the scripts are taken out and the attachments stay.

### Will the pages look different afterwards?

The page content itself is not changed. What you might notice is what was layered on top: comments, highlights, links and visible form fields disappear when annotations are removed.

### Is this the same as redaction?

No. This removes extra data around the pages; it does not touch text on the pages. To delete words or numbers from the page itself, use Redact PDF.

### Are my files uploaded?

No. Remove hidden data from PDF runs inside your browser using WebAssembly, so the file never leaves your device. You can turn off your internet connection after the page loads and it still works.

### Is it free?

Yes, with no watermark, no account and no limit on how often you use it.

### Does it work on a phone or tablet?

Yes, in any modern browser. Very large files are limited by the memory of the device, so a laptop handles them better than a phone.

## Related tools

[Remove metadata Remove document information.](https://docsi.si/tools/remove-pdf-metadata/)[Privacy risk scanner Check what a PDF reveals before you share it, or before you trust one you were sent.](https://docsi.si/tools/pdf-privacy-scanner/)[Verify signatures Check every digital signature in a PDF.](https://docsi.si/tools/verify-pdf-signature/)[Digitally sign Apply a PAdES digital signature.](https://docsi.si/tools/digitally-sign-pdf/)[Inspect certificate Show who a certificate or PKCS#12 file belongs to, its validity period, issuer and fingerprint.](https://docsi.si/tools/certificate-viewer/)[Sign PDF Draw, type or upload a signature.](https://docsi.si/tools/sign-pdf/)[Make signatures long-lasting Store the proof that each signer's certificate was valid.](https://docsi.si/tools/ltv-pdf-signature/)[Redact PDF Black out text for good.](https://docsi.si/tools/redact-pdf/)

## Remove hidden data, and 153 more tools.

[See all tools](https://docsi.si/tools/)[Open the app](https://docsi.si/app/)
