AuraDoc
Sign inSign up

Sanitize or flatten a PDF: remove hidden content or fix what is visible

Before a PDF leaves your hands, two kinds of clean-up are common, and they are easily mixed up. One removes things that are not visible on the page but travel inside the file, such as scripts, metadata and embedded files. The other takes things that are visible but still editable, such as form answers, comments and highlights, and makes them a permanent part of the page. A file can need one, the other, or both, and doing the wrong one leaves the real problem in place.

At a glance

AspectSanitizeFlatten
What it targetsHidden content: scripts, metadata, embedded files and form fields.Visible content that can still be edited: form fields, comments, highlights and stamps.
What the reader seesThe same pages, as they were.The same pages, with the answers and marks now fixed.
Can the content be edited afterwardsThe visible text is unchanged and is edited as before.Form answers and marks can no longer be edited or hidden.
Typical reasonPublishing a file without leftover author data or hidden parts.Sending a filled form that nobody should be able to change.
What stays behindAnything visible on the page.Hidden content such as metadata, unless it is removed separately.

Decide by what you want to get rid of

If your worry is what the file carries without showing it, such as an author name, an old comment trail or an attached document, sanitize it. If your worry is that someone could change the answers or remove a highlight, flatten it. When a filled form will also be published, do both, and keep the original so you can start again if you made a mistake. Always open the result and look through it before you send it.

When to choose which

Sanitize

Choose sanitizing when you want to remove hidden content before sharing or publishing a file.

Flatten

Choose flattening when you want filled answers and marks to stay fixed on the page.

Free tools for both options

Guides that put it into practice

PDF terms explained

Common questions

Does flattening remove metadata?
No. It makes visible content permanent, but properties such as the author and dates stay in the file unless you sanitize it or remove them separately.
Does sanitizing keep the form fields?
No. Sanitizing removes form fields, so use flattening first if you want the answers to stay visible on the page.
Which of your tools handle this?
Sanitize PDF removes scripts, metadata, embedded files and form fields while keeping the visible pages, Flatten PDF merges form fields, comments, highlights and stamps into the page, and Flatten PDF form does this for a filled form. Each tool saves a new file and leaves your original as it was.

Other comparisons

Need more than a quick fix?

AuraDoc is a document platform with OCR, AI search and summaries, and more than 60 PDF tools for teams. Try it free for 7 days.

Tools marked “Secure server” send your file once, over an encrypted connection, to an isolated AuraDoc server. It is processed in a throw-away process and deleted as soon as the result is sent back. Fair use and anti-abuse policy