Lock PDF fields
How to Flatten a PDF
Bake filled form fields into the page so they can no longer be edited: the PDF becomes static. Nothing is uploaded.
- Runs in your browser
- Nothing uploaded
- No sign-up
- Free, no daily limits
- 1Add your file
- 2Choose settings
- 3Download
Drop a PDF here
Choose a fileUpload a filled form PDF to flatten · up to 100 MB · nothing is uploaded
100% Private: All processing happens in your browser. Your PDF never leaves your device.
Your file is safe
It is processed inside this browser tab and never uploaded, and it is gone when you close the page.
Good to know
- Flattening bakes form answers into the page, so they can no longer be edited.
- If the PDF has no form fields, there is nothing to flatten.
- Flattening does not hide text: anyone can still select and copy it.
How to Flatten a PDF Free Online
Flatten PDF is a free, in-browser tool that bakes interactive form fields into the page so a filled PDF can't be edited. Upload a completed form and the tool detects its text boxes, checkboxes, radio buttons, dropdowns, and signature fields, then merges their values into the document and removes the fields. The result looks identical but is fully static: useful before you send a completed form, print it, or file it away. Everything runs locally on your device.
Why Use TryDocsy to Flatten PDFs?
No Upload
Flattening happens in your browser. Your PDF never leaves your device.
Answers Stop Being Fields
Values become page content, so no viewer can retype them in a field.
Consistent Display
The form looks the same in every PDF viewer after flattening.
All Field Types
Text, checkboxes, radios, dropdowns, and signature fields.
One Click
Detects fields automatically and flattens instantly.
Free & Private
No account, no email, no watermark; PDFs up to 100 MB.
Last updated
Flatten PDF turns an interactive fillable form into a static document. The values entered into text boxes, checkboxes, radio buttons, dropdown menus, and signature widgets are converted into permanent page content via form.flatten(), and the interactive AcroForm structure is purged from the document. The resulting file shows identical visual answers in all PDF viewers, but no reader can re-type or tamper with the fields.
Counting begins the moment you pick a document: the interface analyzes the internal AcroForm tree and reports the exact number of active controls found. If the file has no interactive form fields, the tool alerts you immediately rather than re-saving an unchanged file.
How it works
1. Select the filled form
Drag and drop your filled PDF into the upload area or click to browse. The document loads client-side into local browser memory with a maximum recommended size of 100 MB.
2. Verify interactive field count
The client queries doc.getForm().getFields().length to report active fields. If zero fields exist, it informs you that the PDF is already static.
3. Click Flatten Fields
TryDocsy calls form.updateFieldAppearances() to lock in current text formatting, then executes form.flatten() to bake appearances into the content streams.
4. Download the static PDF
A green confirmation message reports the exact count of flattened fields. Click Download Flattened PDF to save the secured file with the -flattened suffix.
When you'd use it
Submitting formal job or loan applications
Official applications are usually distributed as interactive PDF forms. Flattening prior to submission guarantees the receiving party sees fixed entries rather than a live form that could shift or reset.
Resolving blank printout issues
Many desktop print drivers fail to render interactive AcroForm widgets, resulting in empty field boxes on physical paper. Flattening merges values directly into the page content so printers render them reliably.
Archiving compliance records and signed declarations
Audit records and regulatory filings require permanent, immutable representations of signed agreements. Flattening preserves responses as static vector typography.
Preserving form data before merging or splitting
Page-level PDF operations such as combining files often drop detached form dictionaries, erasing entered data. Flattening forms beforehand locks field values into the visual page stream permanently.
How to flatten a PDF step by step
To flatten filled interactive form fields into permanent page content using TryDocsy, follow these four simple steps:
1. Select your filled PDF document: Drag and drop your file into the tool (up to 100 MB). The client automatically queries the internal AcroForm tree and reports the exact number of active form fields found.
2. Check the field count: The tool shows how many form fields it found. If there are none, it tells you the document is already static.
3. Click the Flatten button: TryDocsy updates field appearances to synthesize crisp vector typography, merges each field widget directly into the page content stream, and deletes the root interactive AcroForm structure.
4. Download your static PDF: Click 'Download Flattened PDF' to save your secured file. All answers are now baked into the page, preventing other viewers from modifying your responses.
Why flattening breaks existing digital signatures
A critical technical rule when preparing PDF forms is to flatten fields before applying a cryptographic digital signature, never after. Digital signatures rely on a cryptographic hash digest calculated across the exact byte stream of the PDF file at the moment of signing. Any subsequent modification to the document bytes breaks the certificate digest, causing viewers like Adobe Acrobat to display an error stating that the signature is invalid or the document has been altered.
Because flattening modifies the internal document tree, adding appearance streams to the pages and removing the /AcroForm container, it alters the byte structure of the file. If you flatten an already signed PDF, any cryptographic certificate seal will break. If you require a signed, non-editable document, always complete and flatten the form fields first, then apply your cryptographic digital signature as the final step.
Which tool do I need: Redact, Sanitize, Remove Metadata, or Flatten?
Securing a PDF requires distinct operations depending on whether you are removing visible text, clearing active code, scrubbing file metadata, or locking form answers. Here is the operational breakdown across TryDocsy's privacy utilities:
| Tool | Primary Purpose | How It Works in Code | Vector Text Retained? | |---|---|---|---| | Redact PDF | Remove visible confidential data (SSNs, names, bank numbers) | Flattens target pages to high-resolution JPEG (scale 2, max 4M pixels); clean pages stay vector | No on redacted pages (text eradicated); Yes on clean pages | | Sanitize PDF | Neutralise active executable content and attachments | Strips /OpenAction, /AA auto-run triggers, /JavaScript, and embedded file streams | Yes (100% vector typography retained) | | Remove Metadata | Delete author identities, software history, and tracking | Clears /Info dictionary keys and XML /Metadata (XMP) streams without altering pages | Yes (100% vector typography retained) | | Flatten PDF | Lock interactive AcroForm inputs into static page content | Merges field widgets into page content via form.flatten() and deletes the /AcroForm tree | Yes (field text converted to static vector text) |
Notice that flattening does not hide sensitive text. If you need to erase confidential entries from view, use Redact PDF. To clear file authorship and revision history before publishing, use Remove Metadata.
How field flattening works inside the PDF container
An interactive PDF contains two independent layers: the visual page tree and a separate /AcroForm dictionary defining field names, bounding boxes, default values, and edit events. When a person types into a field, modern viewers store that string inside the form dictionary rather than writing directly into the page content stream.
TryDocsy's flattening engine in lib/pdf-flatten.ts uses @cantoo/pdf-lib to perform a two-stage conversion. First, it triggers form.updateFieldAppearances() to synthesize proper vector fonts and glyphs for every checkbox tick, radio dot, and text string. Second, it calls form.flatten() to inject those visual shapes into the target page's content stream and deletes the root /AcroForm dictionary.
Because this process operates strictly on vector operators, the resulting letters stay crisp at any magnification and remain completely searchable and selectable. Nothing is converted to low-resolution bitmap graphics.
Client error handling and malformed forms
If you select a PDF that contains no fillable fields, FlattenClient displays the message: 'This PDF has no interactive form fields to flatten - it's already static.' This occurs when dealing with scanned document images or PDFs where text was typed over the page with a general annotator.
If a third-party application created an invalid AcroForm structure where field references are corrupt, form.flatten() safely avoids throwing an unhandled exception. Instead, the interface warns: 'This form couldn't be flattened - its form definition is malformed, so the fields would still be editable. Try re-saving the form in the app that produced it, then flatten again.'
If your PDF requires entering new answers rather than freezing existing ones, use PDF Form Filler. To insert new text annotations on flat documents, use Edit PDF.
Frequently asked questions
Why can people still edit my PDF form fields after saving?
When you save a PDF in typical desktop viewers, the application updates the AcroForm field values but leaves the interactive field container active. Anyone opening the file in another viewer can click into the fields and change the numbers or text. Flattening with TryDocsy permanently bakes the field values into the page content stream using form.flatten(), removing the interactive input containers entirely.
What is the difference between flattening a PDF and redacting it?
Flattening locks form field answers into permanent vector text so they cannot be edited, but the text remains completely visible and selectable. Redacting permanently blacks out and removes sensitive text by rasterising target pages into images so the characters cannot be read, highlighted, or recovered.
Will my checkbox marks and dropdown selections stay visible?
Yes. TryDocsy invokes form.updateFieldAppearances() before flattening, which renders checkbox checkmarks, radio buttons, and selected dropdown options into the static page stream exactly as they appear on screen.
Does flattening reduce the PDF file size?
Flattening removes the AcroForm dictionary while adding vector appearance streams to the page content. The resulting file size changes only minimally: it is not a compression tool. To shrink large files, run the output through /pdf/compress.
Should I flatten a form before or after applying a digital signature?
You must always flatten form fields before applying a cryptographic digital signature. Modifying the PDF structure to flatten fields after signing invalidates the digital signature certificate.
Why does the interface say 'This PDF has no interactive form fields to flatten'?
This alert appears when your document does not contain an AcroForm dictionary. Flat scans, flattened exports, and standard documents have no interactive fields to lock.

