Flatten a PDF in your browser: turn filled form fields, and optionally highlights, drawings and stamps, into fixed page content that can no longer be edited.
Flattening turns the interactive parts of a PDF into ordinary page content. A filled-in form field stops being a box you can click and type in and becomes fixed text, a tick or a mark on the page. With the optional annotation setting, highlights, drawings, shapes, stamps and text boxes are burned into the page too. The result looks the same but can no longer be edited, and all of it happens in your browser with pdf-lib.
It draws the appearance of each interactive element into the page content and then deletes the interactive element. For a form field that means the typed text or tick is baked into the page and the field disappears, so nobody can change the answer and every viewer shows the same thing. The page looks the same; it just stops being editable.
Typical cases are sending a completed application or contract so the answers cannot be altered, fixing a form that shows blank or different values in some viewers, and making annotations such as highlights show up in apps that ignore them. Flattening is also a step before printing or archiving a filled form.
Form fields (text, checkbox, radio, dropdown and list) are flattened with the Form fields option. With Annotations switched on, annotations that carry a stored appearance, such as highlights, ink drawings, shapes, stamps and free-text boxes, are drawn into the page. Links are left clickable. An annotation without a stored appearance cannot be drawn, so it is left as it is and the summary tells you how many.
The words of a sticky-note or comment annotation are not stored once it is flattened, only its drawn appearance remains, and the pop-up that held the text is removed. If you need the comments, read or copy them first, or leave the Annotations option off.
Fill PDF Forms lets you type into the fields of a blank form and saves the result already flattened. Flatten PDF is for a form that is already filled in, whether by you in another app or by someone who sent it to you, and it also handles annotations, which the fill tool does not.
Often, because many fields are drawn as ordinary text, but it depends on how the original field drew its value. The reliable way to check is to run PDF to Text on the flattened file and see what comes out.
Some older government and bank forms use XFA, a separate form technology that pdf-lib cannot flatten. If the PDF has one, the tool removes the XFA definition so viewers do not keep showing a live form. XFA-only files often have no ordinary fields underneath, so check that the result still shows your content before relying on it.
No. The file is read and rewritten by pdf-lib in your browser tab and nothing is transmitted, so it is safe for filled forms that contain personal details.
← All tools · PDF Tools · Blog · Cheat sheets · FAQ