Skip to content

Flatten PDF

Turn form fields and annotations into part of the page.

Processed on your device

This tool runs entirely in your browser. Your file is never uploaded, and you can verify that in your browser's network tab. Verify it yourself: open your browser's network tab and watch. You will see one small request asking whether you have tasks left - a tool name and a hash, never the file.

What this does

Flattening turns things that sit on top of a page into part of the page itself. A filled form stops being fillable and becomes a document that reads the same everywhere; a highlight stops being an annotation a reader can drag away and becomes ink. The values and marks are drawn into the page content, and the field and annotation objects are then removed.

Use it before you send a completed form back, so the recipient cannot alter what you entered and no reader can clear the fields by accident. It is also the fix for a form that looks filled on screen and prints blank, and for a marked-up draft you want to circulate with the comments visible but no longer editable.

How it works

  1. Drop the PDF onto this page.
  2. Leave Flatten form fields on to make the filled values permanent, and Flatten annotations on to burn in highlights, notes, stamps and drawings.
  3. Turn one of them off to keep the other: flattening only the annotations leaves the form fillable, and flattening only the form leaves the comments editable.
  4. Check the advanced options if you want unfilled fields to stay visible as empty boxes, or the drawing font embedded so the result renders identically elsewhere.
  5. Press Flatten. The result reports how many fields and how many annotations were burned in.

There is one failure this tool is built around, and most flatteners fall into it. A form whose /NeedAppearances flag is set carries no drawn appearance for its fields - the reader is expected to render the contents itself from the raw values. Flatten such a file naively and every filled box comes out empty, silently, with the typed data gone. Here the appearances are generated first and then flattened, which is why your entries survive, and any field that could not be drawn is reported rather than quietly dropped.

Links are never flattened, and that is deliberate. A link annotation has no ink of its own - it is an invisible rectangle that responds to a click - so burning it into the page would destroy a working hyperlink and draw nothing in its place. Pop-up windows are skipped for the same reason, and annotations marked hidden are left alone since they were never meant to be seen.

Flattening is one-way. The values are now marks on the page and there is no field left holding them, so no reader can extract, edit or clear them again. Keep the fillable original if you might need to correct an entry, and treat the flattened file as the copy you send rather than the copy you keep.

This is not a digital signature and does not stand in for one. Flattening makes a document harder to edit casually, but the page content is still ordinary PDF an editor can change. If you need evidence that a document has not been altered, sign it; if you need to stop people extracting or editing it, Protect PDF adds the restrictions. Flattening an already-signed document invalidates the signature.

The work happens with pdf-lib in a Web Worker on your device. A completed form usually contains exactly the details you would least like to post to a stranger's server - name, address, account number - and this one never leaves your browser.

What this tool cannot do

  • Flattening cannot be undone from the output. The fields no longer exist, so keep the fillable original if you may need to change an entry.
  • A digital signature does not survive flattening. The signed bytes change, so the signature stops validating and the file must be signed again afterwards.

Questions people ask

What does flattening a PDF mean?
It draws whatever sits on top of the page - form field values, highlights, notes, stamps, drawn shapes - into the page content itself and then deletes the objects that held them. The document looks the same and behaves differently: nothing on it can be edited, cleared or moved by a reader any more.
Can I unflatten it later?
No. Once a value is part of the page there is no field left to put it back into, so the change is permanent in the output. Your original is untouched, because this tool writes a new file rather than modifying the one you dropped in - keep it if there is any chance you will need to edit an entry.
What happens to fields I left blank?
They are flattened along with the rest, so a box with a visible border keeps its border and nothing in it. If you are preparing a form to be printed and completed by hand, use the keep empty fields option in advanced settings so the blanks stay visible as boxes to write in.
Is a flattened form the same as a signed one?
No. Flattening removes the fields, which stops casual editing, but the page content is still editable in a PDF editor and nothing proves the document is unchanged. Use a digital signature for that, and note that flattening a file after it has been signed invalidates the signature.
Is my completed form uploaded?
No. A filled form is usually the most sensitive PDF anyone handles, and this one is processed by pdf-lib inside your browser. Nothing about the form is transmitted, and you can watch the network tab to confirm it: one request asks whether you have tasks left, carrying a tool name and a hash.

Related tools