keptlocal
Files never leave your browser

Flatten PDF — Lock Form Fields, No Upload

Flatten a PDF without uploading — no signup, no account, no watermark. Locks form fields by converting them to static page content. Prevents editing of completed forms. Runs entirely in your browser.

Drop a PDF here, or

PDF files only. Form fields and annotations are baked into page content. Runs entirely in your browser.

Upload a PDF with form fields to flatten.

How to flatten a PDF

  1. Upload your PDF by dropping it onto the upload area or clicking to browse. Any PDF with form fields or annotations is supported.
  2. Review the options. Form field flattening is always applied — it is the core function of this tool. Annotation flattening (comments, highlights, stamps) is enabled by default; uncheck it if you want to keep annotations interactive.
  3. Click Flatten PDF. The flattened file downloads automatically with "-flattened" added to the filename.

The entire operation runs in your browser using pdf-lib. Your PDF is never sent to a server.

What does flattening a PDF mean?

A PDF form contains two distinct layers. The first is the static page content — the background layout, text, images, and formatting that do not change. The second is the interactive layer — form fields (text inputs, checkboxes, radio buttons, dropdowns, signature fields) and annotations (comments, stamps, highlights) that can be interacted with, filled in, or modified.

Flattening merges these two layers into one. Every form field's current value is rendered directly onto the page content, and the interactive field is removed. A checkbox that was checked becomes a permanent visual checkmark drawn on the page. A text field that contained "John Smith" becomes static text on the page. The result is a PDF that looks exactly like the filled-out form but has no interactive elements — it is a final, locked version.

The flattened PDF can be opened, printed, and viewed in any PDF reader. The content cannot be changed by filling in fields or editing annotations, because those fields no longer exist as interactive elements.

When to flatten a PDF

  • Before sending a completed form. Flattening a filled PDF before emailing it or submitting it prevents the recipient from modifying the entered values. The form data is baked into the document permanently.
  • Before archiving signed documents. If you have signed a PDF using a visual signature (image stamped on the page), flattening removes the interactive signature field and makes the signature part of the permanent page content. This prevents accidental clearing of the signature.
  • Before printing. Some PDF printers and printing services handle flat PDFs more reliably than forms with interactive elements. Flattening before printing eliminates potential rendering issues where fields appear blank or are displayed incorrectly.
  • Before converting to image. When converting a PDF to JPG or PNG (using the PDF to JPG tool), form fields may not render correctly — some PDF renderers show empty fields even when they contain data. Flattening first bakes the field values into the page so they render correctly in the converted image.
  • Before combining with other PDFs. Merging PDFs that contain form fields can cause field name conflicts and interactive inconsistencies. Flattening each form first ensures the Merge PDF tool produces a clean, consistently formatted output.
  • Locking a completed document. When you want to share a PDF that cannot be edited — a finalized contract, a completed application, a reviewed and approved document — flattening removes editability while preserving the complete visual content.

Flatten vs. protect: which do you need?

Flattening removes interactivity but does not restrict who can open, print, or copy text from the PDF. A flattened PDF is a static document with no access controls.

Password protection (available on the Protect PDF tool) controls who can open the document. These two features serve different purposes and can be combined: flatten first to lock in the form data, then protect to control access.

Neither flattening nor password protection adds a cryptographic audit trail or digital signature. For documents where you need to prove the document has not been modified since signing, use a certified e-signature service that creates a PAdES/PKCS#7 digital signature. For the vast majority of everyday form submissions and document sharing, flattening is the right choice.

How PDF flattening works technically

PDF form fields are stored as AcroForm widgets — PDF objects that describe a field's position, size, type, and current value. When a user fills in a text field, the entered text is stored in the field's value property and rendered visually using an appearance stream.

Flattening takes each field's appearance stream — the visual rendering of its current value — and copies it into the page's content stream as static drawing instructions. The AcroForm widget object is then removed. The page now contains exactly what the field looked like, drawn as permanent content, with no associated interactive logic.

This tool uses pdf-lib's form.flatten() method, which handles this process for all field types — text inputs, checkboxes, radio buttons, dropdowns, list boxes, and signature fields. The operation runs entirely in your browser.

Limits and what to expect

  • Empty fields become empty static areas. If a form field has not been filled in, its empty appearance is flattened — a blank space on the page where the field was. This is correct behaviour.
  • Complex appearance streams. Most standard PDF form fields flatten correctly. Highly customised fields with non-standard appearance streams (common in forms created by enterprise PDF tools) may not render exactly as they appeared in the original viewer.
  • Digital signatures. Cryptographic PDF digital signatures (PAdES, PKCS#7) are separate from visual appearance and are affected by flattening. If the PDF has been cryptographically signed, flattening may invalidate the digital signature — the signature validates document integrity, and modifying the document structure breaks that validation.
  • Encrypted PDFs. Password-protected PDFs cannot be flattened directly. Use the Unlock PDF tool first, then flatten the unlocked copy.
  • File size. Flattened PDFs are typically smaller than the original because AcroForm widget data is removed and replaced with static content. The exact size change depends on the form complexity.

Privacy: what happens to your PDF

Your PDF is loaded into browser memory and processed by pdf-lib running locally. The flattened output is created in memory and downloaded directly to your device. No document data — including any filled-in form values — leaves your device.

This is especially relevant for sensitive forms: tax documents, legal agreements, medical intake forms, financial applications. Processing them locally means the values you entered never pass through a third-party server.

Frequently asked questions

Are my files uploaded to a server?
No. Flattening runs entirely in your browser using pdf-lib. Your PDF never leaves your device — open DevTools → Network while processing to confirm zero upload requests.
What is PDF flattening?
Flattening merges the interactive form layer (text fields, checkboxes, radio buttons) with the static page content. Each field's current value is drawn permanently onto the page, and the interactive field is removed. The result looks identical but cannot be edited as a form.
Can I un-flatten a PDF?
No. Flattening is irreversible — the interactive fields are removed from the PDF structure. Always keep a copy of the original fillable PDF if you might need to change values later.
Will empty form fields appear as blank spaces?
Yes. An empty field's appearance (a blank area) is rendered as part of the page content. If a field was never filled in, a blank space appears where it was.
Does flattening affect password-protected PDFs?
Encrypted PDFs cannot be flattened directly. Unlock the PDF first using the Unlock PDF tool, then flatten it.
Will digital signatures be affected?
Cryptographic digital signatures may be invalidated by flattening because the document structure changes. If the PDF has a PAdES or PKCS#7 digital signature, the signature's integrity check will fail after flattening. Visual signature images are unaffected.