Free PDF Flatten Online

Flatten all form fields and annotations into static page content. Instant results, no upload to any server.

Your files never leave your device
Drop PDF here or click to browse

Supports PDF files · up to 100 MB

Flattening Options
About PDF Flattening: This tool converts all interactive form fields, buttons, and annotations into static page content. The visual appearance is completely preserved, but the fields become non-editable. This is useful for finalizing completed forms, archiving documents, and ensuring the PDF cannot be accidentally modified. Client-side processing means your data stays private.

How It Works

  1. Select or drop a PDF file above.
  2. Choose which elements to flatten (form fields and/or annotations).
  3. Click "Flatten PDF" to process the file in your browser · nothing is uploaded.
  4. Download the flattened PDF immediately with all interactive elements converted to static content.

Why Flatten PDFs?

Flattening PDFs is essential for finalizing documents, preventing accidental modification, and ensuring compatibility across systems. When you flatten a form, all user-entered data becomes permanent and non-editable. This is critical for legal documents, contracts, completed applications, and archived records. Flattening also reduces file size slightly and ensures the PDF looks identical on all devices and applications, since no form interpretation is needed.

What Gets Flattened?

When to Flatten PDFs

Frequently Asked Questions

Will the PDF look different after flattening?

No. Flattening preserves the exact visual appearance of your PDF. All form fields, annotations, and content will look identical to how they appeared before. Only the interactivity is removed.

Can I undo flattening?

No. Once a PDF is flattened, the original form fields and interactive elements are merged into the page background. You cannot recover them. Always keep a backup of the original PDF if you may need to edit it later.

What if the PDF has no form fields?

If a PDF contains no form fields or annotations, the file will be processed but no flattening will occur. The output file will be similar to the input. You can safely flatten any PDF, even those without interactive elements.

Is my PDF uploaded to a server?

No. All flattening happens locally in your browser. Your PDF never leaves your device, ensuring complete privacy and security.

Does flattening reduce file size?

Slightly. Removing form field definitions can reduce file size by 1-5% depending on the PDF structure. However, flattening is primarily about finalizing documents rather than compression.

What's the file size limit?

The tool supports PDFs up to 100 MB. Processing time depends on file size and complexity. Most PDFs flatten within seconds.

What "PDF flatten" actually means

"Flatten" is one of those PDF-tool verbs that means several genuinely different things depending on what is being flattened, and the distinction matters because the operations succeed and fail in different ways. Form-field flattening is the operation this tool performs by default. A PDF form field, in the AcroForm sense, is a logical construct: there is a field object in the document catalog with a name like FirstName and a value like Sasha, and there are one or more widget annotations on the page that render the field visually. The widget knows what to draw because its appearance dictionary (/AP) points to a small content stream that contains the draw operators, the embedded fonts, and the text. The field and the widget are two different objects: one stores the data, the other stores the picture. Flattening reverses the relationship: the appearance stream is drawn directly onto the page's content stream as if it had always been part of the page, and the field and widget objects are then deleted. The pixels look identical, but the form structure is gone.

Annotation flattening is the analogous operation for non-form annotations: sticky notes, highlights, strikeouts, freehand drawings, text-box callouts, stamps. Each markup annotation also has an appearance stream (/AP/N) that the reader uses to draw the mark; flattening writes that stream onto the page and removes the annotation object. The visual mark stays, the ability to click, select, edit, or remove the mark goes away. This tool flattens both form fields and annotations by default; the two checkboxes above let you disable either independently if you want to keep one kind of interactivity while removing the other.

Transparency flattening is something different: the operation that takes a PDF with semi-transparent objects and converts them to a collection of fully opaque tiles that look the same when composited. PDF/A-1 archival conversion needs that step because PDF/A-1 does not allow transparency. PDF/A-2 onward allows transparency natively and skips it. This tool does not perform transparency flattening, the term overlap is unfortunate but the operations are distinct. If you need PDF/A-1 conformance, run this tool first to flatten the forms and annotations, then run a dedicated PDF/A converter that handles the transparency step.

How this tool works

This tool uses pdf-lib, the JavaScript PDF library written by Andrew Dillon and maintained as open source since 2018. pdf-lib is implemented in TypeScript and compiled to about 1.1 MB of pure JavaScript with no native or WebAssembly dependencies. It runs in any JavaScript environment, the browser tab here, but also Node.js, Deno, React Native, and service workers. The library is the de facto standard for browser-side PDF manipulation: it is used by Documenso, by several major SaaS products' PDF-edit features, and by countless internal tools and form-processing pipelines.

When you select a PDF, the browser File API hands the raw bytes directly to pdf-lib running in the page's JavaScript engine. pdf-lib parses the file into an object model, walks the AcroForm tree to count fields, exposes the count back to the page, and waits for the Flatten button. When you click Flatten, the selected options are passed to pdf-lib's form.flatten() method, which iterates over every field, regenerates appearance streams to capture the current values, copies the appearance streams onto each widget's page at the widget's rectangle, and removes the widget and field objects from the document. The resulting bytes are serialised back to a Blob which the page wraps in a download URL. No network request fires during the flatten. You can verify there is no upload: open the browser developer tools to the Network tab before clicking Flatten, run the operation, and watch for any request with your file contents. There will be none.

The AcroForm structure, briefly

When a PDF contains an interactive form, the document catalog includes an /AcroForm entry that points to an AcroForm dictionary. The dictionary's load-bearing fields are /Fields (the array of field objects, each with a partial name, a current value, a field type, and a kids array of widget annotation references), /DR (the default resources dictionary that holds fonts and colour spaces referenced by field appearance streams), /DA (the default appearance string, a one-line content stream fragment like 0 0 0 rg /Helv 12 Tf that sets default text colour, font, and size), and /NeedAppearances (a boolean flag).

The /NeedAppearances flag matters because pdf-lib's flatten respects whatever appearance is stored in each widget. When the flag is true, the reader is expected to regenerate appearance streams before display, so the streams on disk may be stale. The rule of thumb is to regenerate appearances before flattening, which this tool does for you. A field can have multiple widget annotations on different pages (useful for radio groups or recurring signature blocks); a widget can belong to only one field. The widget itself is just an annotation with /Subtype /Widget, a parent reference back to the field object, a rect for where on the page to draw, and an /AP/N appearance stream that gets drawn there.

A brief history of PDF forms

The annotation universe

PDF defines roughly 25 annotation subtypes. The ones a flatten operation handles, in rough order of how often they appear: Text (the sticky-note icon with a popup window); Highlight, Underline, Squiggly, StrikeOut (the text-markup group, each with a /QuadPoints array describing the quadrilaterals to draw); FreeText (rectangular text annotations placed directly on the page, used for callouts and inline labels); Line, Square, Circle, Polygon, PolyLine (the shape group); Ink (freehand pen strokes from a digital pen or stylus); Stamp (rubber-stamp images such as "Approved" or "Confidential"); FileAttachment (an icon with a file attached); Caret (a small "insert text here" mark, often paired with Highlight); Popup (the floating window that holds the user-visible comment text, flattened together with its parent markup annotation); Widget (the form-field group, handled by AcroForm flattening rather than annotation flattening).

Each annotation type has its own appearance rules, but the flatten operation does not need to know them; it just renders whatever is in the annotation's /AP/N stream onto the page. Annotations with no /AP (a small minority, mostly malformed PDFs) cannot be flattened reliably and are usually left untouched. Link annotations (clickable URL hotspots) are technically annotations but typically not flattened by this tool: the visual indication (the underlined text) is already part of the page content and there is nothing graphical to bake in, so removing the link would only delete the click target.

Real-world workflows that drive PDF flatten

Common pitfalls and what they mean

Browser-only versus cloud flatten

Every cloud PDF-flatten service (Smallpdf, ILovePDF, PDF24 web, Adobe Acrobat Online, Sejda, DocHub, and a dozen smaller ones) uploads your PDF to the operator's servers, runs the flatten there, and serves the flattened copy back as a download. The PDF transits the public internet encrypted with TLS, sits in the operator's storage for a window ranging from minutes to days depending on the operator, gets flattened by the operator's PDF library running on the operator's infrastructure, and is then deleted. Privacy policies generally commit to deletion within hours to one day, TLS in transit, and (for the larger operators) ISO/IEC 27001-certified infrastructure. The operators have commercial reasons to honour those commitments. They also have logs, backup snapshots, and incident-response data flows that are not, in the general case, covered by the deletion commitment.

This tool does not upload the PDF. The pdf-lib code runs in your browser tab, receives the file bytes through the File API, performs the flatten in the JavaScript engine, and returns the flattened bytes as a Blob to the same tab. You can prove there is no upload: open the developer tools to the Network tab before clicking Flatten, run the operation, and observe that no requests fire with your file content. The pdf-lib code was loaded once from a CDN at page load and is cached by the browser; the flatten operation makes no further network requests. The trade-off is feature scope: cloud services often bundle OCR, Word/Excel conversion, or aggressive compression alongside the flatten. The browser-side flatten here does just the flatten. For OCR or format conversion, the cloud services are the right call; for a sensitive document where the privacy posture matters, the browser is.

More frequently asked questions

What form types does this tool handle?

AcroForm in all its varieties: text fields, checkboxes, radio buttons, dropdowns, list boxes, push buttons, and signature fields (the visual widget, not the cryptographic signature). XFA forms are not supported because XFA's dynamic layout requires Adobe's proprietary JavaScript and layout engine. If your form is XFA-only, the flatten will succeed but leave the form interactive; opening the PDF in Adobe Acrobat and saving as Reader Extended PDF converts most XFA forms to AcroForm equivalents that this tool can then flatten.

Can I flatten just one page or just one field?

No. This tool flattens the whole document. Selective flattening (one field at a time, or one page at a time) requires Adobe Acrobat Pro or a developer library called from a custom script. For most workflows the whole-document flatten is what you want anyway, since "some fields static, others editable" is rarely the intent.

Does this preserve bookmarks, metadata, and attachments?

Yes for bookmarks (the document outline), document metadata (title, author, subject, keywords, creation and modification dates), embedded files and attachments, optional content groups (layers), and tagged-PDF accessibility structure for non-form content. Form-related tags are removed along with the fields, which is the expected behaviour for flatten. Hyperlinks survive when "flatten annotations" is unchecked; when both options are checked, link annotation hotspots are also removed (the visible underlined text remains).

What about password-protected PDFs?

Flatten cannot run on an encrypted PDF: pdf-lib needs to read the form structure, and reading is gated by decryption. Unlock the PDF first with PDF Unlock, then flatten. If you want the flattened output to be password-protected, run it through PDF Protect afterwards. The three-step unlock, flatten, protect is the standard workflow for "finalise and re-secure" archival pipelines.

Is this the same as printing to PDF?

Practically similar, structurally different. Printing to PDF rasterises or re-imposes the page through the operating system's print pipeline, which usually flattens fields as a side effect but also re-encodes images, re-embeds fonts in different subsets, and sometimes changes page size or margins. This tool's flatten operates on the PDF object structure directly, preserving the original images, fonts, and page geometry exactly. Use print-to-PDF when you want a fresh rasterised copy; use flatten when you want the original PDF with just the form structure removed.

Is there a desktop or command-line equivalent?

pdf-lib runs in Node.js (npm install pdf-lib) and the flatten call is the same: await form.flatten() followed by await pdfDoc.save(). For command-line, qpdf has a partial equivalent (qpdf --flatten-rotation --generate-appearances) that handles appearance regeneration but not the form-removal step; pdftk's flatten operation does the removal but skips appearance regeneration. Adobe Acrobat Pro's "Flatten Fields" menu item handles both steps natively and is the reference for behaviour parity.

Related Tools