Flatten a PDF Online Free (No Upload) [2026]
You filled in a PDF form and now need to send it β but the recipient could still edit every field, clear your answers, or alter the content before printing or forwarding it. Flattening converts those interactive fields into permanent, printed content that cannot be changed. SammaPix Flatten PDF runs pdf-lib form.flatten() entirely in your browser. No upload, no server, no signup. Here is exactly what flattening does, why it is not the same as printing to PDF, and how to verify no upload happens.

Table of Contents
What does it mean to flatten a PDF?
A fillable PDF contains two layers: the visual content of the document (text, images, layout) and an interactive form layer made up of field widgets. When you type into a text field, check a box, or select a dropdown option, you are filling in the form layer. That layer sits on top of the page content and is separate from it β which is why the same PDF can look slightly different when opened in different PDF readers, and why someone can always clear your answers or change them after the fact.
Flattening collapses the form layer into the page content. Using pdf-lib's form.flatten() method, each field's current visual appearance is rendered into the page content stream and the field widget is removed. The result is a PDF that looks exactly like the filled form, but contains no form infrastructure β no field definitions, no annotation widgets, no interactive element of any kind.
To the recipient, the document looks identical to what you submitted. But when they open it in Adobe Acrobat, Chrome, Preview, or any other PDF reader, there are no clickable fields, no editable boxes, no way to modify the content. The values you entered are as permanent as any other text in the document.
Why "making a PDF non-editable" requires flattening
People often search for "make PDF non-editable" and land on solutions involving password-protecting the file or locking the form. Password protection (an owner password) sets permission flags that tell PDF readers to block editing β but the form fields themselves still exist in the file, and any software that ignores permission flags (or any user with a PDF editor) can still access and modify them. Flattening is the only way to structurally remove the form layer and make the document genuinely non-editable at the content level, without requiring cryptographic access control.
Flatten vs print to PDF: why the difference matters
This is the distinction that most guides miss, and it is critical if you are submitting forms to government agencies, employers, banks, or any institution that processes PDFs programmatically.
| Property | Flatten via pdf-lib | Print to PDF (OS dialog) |
|---|---|---|
| Text quality | Vector β sharp at any zoom or print size. Text is selectable and copy-paste friendly. | Rasterized β each page becomes an image. Text is not selectable and degrades under zoom. |
| Searchability | Full text search works β Ctrl+F finds content in the flattened PDF. | No text search β content is embedded as images. OCR is required to recover text. |
| File size | Close to the original β form metadata removed, page content slightly extended. | Often significantly larger β page images at 150 to 300 DPI add substantial file size. |
| Font fidelity | Original fonts preserved β the flattened text uses the same fonts as the document. | Fonts rasterized at print resolution β typeface detail lost at high zoom levels. |
| Accessibility | Screen readers can access the text content of the flattened document. | No accessibility β screen readers see images with no text content to read. |
| Form fields remain? | No β form layer structurally removed. | No β but only because everything becomes an image. |
| Recommended for submission? | Yes β the correct approach | Last resort only |
Government portals, HR systems, and legal processing platforms often need to extract text from PDFs programmatically. A printed-to-PDF form breaks their workflow because the text is embedded in page images. A flattened PDF works seamlessly because the text is still real, selectable, machine-readable content β it just can no longer be changed.
When you need to flatten a PDF form
Flattening is the right step in a specific set of workflows. Here are the most common situations where it matters:
- Submitting a completed application form by email. When you email a filled PDF application (job application, rental application, insurance form), the recipient can still clear your answers and fill in different values. Flattening guarantees the submitted answers are permanent.
- Archiving completed forms for your own records. If you keep copies of filled-in tax forms, government applications, or insurance claims, a flattened copy is safer for archival β it ensures the record of what you submitted is permanent and cannot be accidentally modified.
- Uploading to a portal that requires a non-interactive PDF. Some government and HR portals reject PDFs that still contain form fields, because their systems try to process the form layer and encounter unexpected data. A flattened PDF passes these checks cleanly.
- Ensuring consistent rendering before printing. Fillable form field values can render differently on different printers and in different print drivers. Flattening converts the form values into page content, guaranteeing the printed output matches what you see on screen exactly.
- Combining a filled form with other PDFs via merge. When you merge multiple PDFs together, conflicting form field names from different documents can cause errors or data loss. Flattening the filled form first removes the form structure entirely, making the merge clean and predictable. See Merge PDFs Privately: No Upload, No Adobe.
- Finalizing a PDF before adding a watermark or signature. Adding a watermark or a visual signature to a PDF that still has interactive form fields can produce unexpected layer ordering in some PDF viewers. Flattening the form first produces a clean base document, then you can apply a watermark or sign it. See PDF Watermark and PDF Sign.
How browser-based PDF flattening works
SammaPix Flatten PDF uses pdf-lib's PDFForm.flatten() method, which implements the PDF specification's flattening procedure entirely in JavaScript. Here is what happens under the hood when you click Flatten PDF:
- Your browser reads the PDF. The FileReader API loads the file into browser memory as an ArrayBuffer. No network request is made. Nothing leaves your device.
- pdf-lib parses the document structure. The library reads the PDF's internal cross-reference table, page tree, AcroForm dictionary, and all field widget annotations. It builds an in-memory model of the document including all form fields and their current values.
- Each field's appearance stream is rendered into page content. For each field widget, pdf-lib takes the field's appearance stream (the visual rendering of its current value) and appends it to the underlying page content stream. Text field values, checkbox states, and radio button selections all become regular PDF drawing instructions embedded in the page.
- The field annotation objects are removed. After each field's content is embedded into the page, the widget annotation object for that field is deleted from the PDF structure. The AcroForm dictionary (the container for all form fields) is cleared. The interactive form layer ceases to exist.
- The flattened PDF is serialized and offered for download. pdf-lib writes the updated document to an ArrayBuffer, which is wrapped in a Blob and downloaded via a
blob:URL. No network request. The file never leaves your browser.
The entire process completes in under a second for most typical fillable forms. Processing time scales with the number of pages and form fields β a 50-page form with 200 fields may take 2 to 3 seconds on an average device, which is still far faster than any upload-process-download cycle.
Flatten your filled PDF in your browser
pdf-lib form.flatten() runs locally. No upload, no server. Vector quality preserved. Form fields become permanent printed content β non-editable on any PDF reader. Free.
Open Flatten PDF, FreeWhat form field types are flattened
The PDF specification (ISO 32000) defines several field types in the AcroForm interactive form model. Here is what happens to each when you flatten a PDF with pdf-lib:
| Field type | What it contains | After flattening |
|---|---|---|
| Text field | Single-line or multi-line typed text | Text becomes permanent page content β selectable, searchable, non-editable |
| Checkbox | Checked or unchecked state | Check mark (or empty box) embedded as static page content |
| Radio button | Selected option in a group | Selected and unselected states embedded as static page content |
| Dropdown / listbox | Currently selected option text | Selected value text embedded as static content β no dropdown widget |
| Signature field | Empty placeholder or applied visual signature | Visual appearance (image or drawn signature) embedded as static content |
| Button (push button) | Submit, reset, or custom action trigger | Button visual removed; action is eliminated entirely |
One important note about cryptographic digital signatures: a PDF with a cryptographic signature (one that creates a mathematically verifiable audit trail) is different from a visual signature field. Flattening such a document may invalidate the cryptographic signature, because the page content is being modified. If your PDF contains a certified digital signature (as opposed to a visual βdraw your signatureβ field), do not flatten it β the certificate verification will break. The distinction is covered in detail in the sign PDF online guide.
How to flatten a PDF online, step by step
The entire process takes under a minute for most fillable PDF forms:
- Go to sammapix.com/tools/flatten-pdf in Chrome, Safari, Firefox, or Edge. No account required.
- Make sure your PDF is filled in first. Flattening embeds the current state of each form field. If the fields are still empty, the flattened PDF will have empty content where the fields were β which is rarely what you want. Fill the form first, then flatten.
- Drop your filled PDF onto the dropzone or click to browse. The file is loaded into browser memory. Nothing is sent to any server.
- Click Flatten PDF. pdf-lib processes every page and every field. The tool confirms how many form fields were found and flattened.
- Download the flattened PDF. Click Download. The file is served from browser memory as a Blob. No network request occurs. Your original PDF is unchanged.
- Verify the result. Open the downloaded PDF in a different PDF reader than the one you used to fill the form (for example, open it in Chrome if you filled it in Adobe Acrobat). Click where form fields used to be β you should not be able to type or interact with any element. The document is fully static.
What happens if the PDF has no form fields
Not every PDF is a fillable form. You may drop in a regular document, a scanned PDF, or a PDF that was already flattened by its creator. The tool handles this case honestly:
- Zero fields found, zero fields flattened. The tool reports this result clearly. The output PDF is still valid and can be downloaded, but it is structurally identical to the input. No content is added or removed.
- No silent rasterization. The tool does not fall back to printing the PDF to images just to produce a different-looking output. If there is nothing to flatten, the output is honest about that.
- Why you might see zero fields on a form PDF. The PDF may already have been flattened by its creator before distribution. Some βfillable PDFsβ are actually scanned images with no AcroForm layer β they look editable but are already just static images. Some PDFs use XFA forms (a different, non-standard form architecture) instead of AcroForm fields; pdf-lib does not support XFA, and XFA-based fields will not be detected or flattened.
Your filled form stays on your device
No upload, no account, no server. pdf-lib form.flatten() in the browser. Vector quality preserved. Honest about no-form-fields case. Free.
How to verify no upload happens
You do not need to take my word for this. Here is how to verify it in under two minutes with your browser's built-in developer tools:
- Open DevTools. Press F12 (Windows/Linux) or Command Option I (Mac). On Safari, enable Developer Tools first in Settings, then Advanced, then Show Develop menu.
- Go to the Network tab. Click the Network panel. Clear any existing entries using the clear button.
- Drop your PDF and click Flatten PDF. Watch the Network panel during the entire process β from file drop to clicking Download.
- Observe: zero outgoing requests carrying your file. You will see requests for static page assets (JavaScript, CSS, fonts) when the tool loads. During flattening and download, the Network panel shows no outgoing requests. Nothing carries your PDF bytes anywhere.
Try the same test with any upload-based PDF tool β you will see a large POST request carrying your file as form-data or a multipart upload. The difference is visible, measurable, and verifiable by anyone with a browser.
Browser-based vs upload-based PDF flatten tools: comparison
Here is an objective comparison across the dimensions that matter when choosing a tool to flatten a PDF:
| Dimension | Upload-based (iLovePDF, Smallpdf, ILovePDF, Adobe Online) | Browser-based (SammaPix) |
|---|---|---|
| Privacy | Your filled form β potentially containing personal data β is uploaded to a remote server. Their privacy policy covers what they do with it. | Flattening runs locally. No server ever sees your file or its contents. |
| Output quality | Varies by service. Some rasterize as part of flattening, producing image-based output. | Vector quality preserved. pdf-lib flattens to page content streams, not images. Text stays selectable. |
| File size limits | Free tiers often cap at 5 to 25 MB per file. | Limited by device memory β no artificial cap. |
| Signup required | Often required for full features or higher limits. | No account required. |
| Honest about no-form-fields case | Most tools process silently regardless β you may get a rasterized output even when the input had no form fields. | Reports zero fields found β no hidden rasterization fallback. |
| Verifiable behavior | Requires trusting the service. No independent verification possible. | Verifiable via DevTools Network tab. pdf-lib is open-source. |
Other PDF tools that run in your browser
SammaPix offers a full suite of browser-based PDF tools β all with no upload and no server processing. Here is when to use each alongside Flatten PDF:
- Flatten PDF: convert fillable form fields into permanent, printed content. The right step before submitting, archiving, or merging a filled form.
- PDF Sign: add a visual signature (drawn by hand or uploaded as an image) to any PDF page. See the guide at Sign a PDF Online Free (No Upload).
- PDF Watermark: stamp CONFIDENTIAL, DRAFT, or a logo image across every page. Often combined with flattening β flatten the form first, then watermark. See Add a Watermark to a PDF Online Free.
- PDF Protect: add an AES-256 open password to a flattened PDF if you also need to control who can open it. Flattening + password protection covers both content permanence and access control. See Password Protect a PDF Online Without Uploading It.
- PDF Compress: reduce file size after flattening, before emailing or uploading. See Compress a PDF Online Without Uploading It.
All your PDF needs, all in-browser
Flatten, sign, watermark, protect, and compress PDFs without uploading them anywhere. All tools run locally in your browser via pdf-lib. No server. No signup. No watermark on output.
FAQ
What does it mean to flatten a PDF?
Flattening a PDF means converting all interactive form fields β text boxes, checkboxes, radio buttons, dropdown menus, and signature fields β into permanent, static page content. Once flattened, the values that were typed or selected in those fields become part of the visual content of the PDF, indistinguishable from any other text or graphic on the page. The interactive layer is removed entirely. The recipient opens the document and sees exactly what was filled in, but cannot edit, clear, or interact with any field. Flattening is the correct way to finalize a filled-in PDF form before sending it.
What is the difference between flattening a PDF and printing it to PDF?
Both operations make a PDF non-editable, but they work very differently. Flattening via pdf-lib form.flatten() preserves the full vector quality of the document β text stays sharp, vector graphics stay sharp, fonts remain embedded, and the file is still searchable and copy-paste friendly. Printing to PDF (using your operating system's Print dialog and choosing Save as PDF) rasterizes the entire document: the output is a collection of images, one per page. Text is no longer selectable, the file size is typically larger, and text quality degrades when zoomed in or printed at high resolution. For any form you intend to submit, archive, or sign electronically, flattening is the correct method. Printing to PDF is a last resort when you lack proper tools.
Does flattening a PDF online mean uploading it to a server?
With most online tools, yes. Services like iLovePDF, Smallpdf, and similar PDF converters upload your PDF to their server for processing before sending it back. For forms that contain personal information β tax returns, medical records, government applications, financial statements β this is an unnecessary risk. With SammaPix Flatten PDF, the entire process runs in your browser using pdf-lib. Your file never leaves your device. You can verify this by opening your browser's DevTools (F12), going to the Network tab, and watching for outgoing requests while the tool runs. You will see none carrying your file.
Can I unflatten a PDF after flattening it?
No. Flattening is a one-way, irreversible operation. Once form fields have been converted into static page content, there is no way to restore the interactive form layer or extract the original field structure from the resulting PDF β not with this tool, not with any other tool. This is by design: the whole point of flattening is to produce a document where the values are permanently embedded. Before flattening, always keep a backup of the original fillable PDF if you might need to change any values later. The tool processes a copy of your file; your original is not modified.
What happens if my PDF has no form fields?
The tool handles this case honestly. If you drop in a PDF that has no interactive form fields β a regular document, a scanned PDF, or a previously flattened PDF β the tool reports that zero fields were found and zero fields were flattened. The output PDF is still a valid PDF and can still be downloaded, but it is structurally identical to the input: no visible change occurs because there was nothing to flatten. The tool does not invent changes or silently rasterize the document. If you receive a report of zero fields flattened and expected more, the PDF may already have been flattened by its creator, or it may not be a form PDF.
Does flattening a PDF make it smaller or larger?
Flattening typically has a minor effect on file size and can go either way. The flattened PDF removes the form field metadata and annotation objects from the file structure, which can make the file slightly smaller. However, if the form fields contained rich content (images in signature fields, for example), the flattened content layer may add slightly to the page content streams. In practice, for most standard text-based fillable forms, the flattened output is very close in size to the original β typically within 1 to 5 percent. If file size reduction is your primary goal, see SammaPix PDF Compress, which applies image resampling to reduce file size independently of flattening.
Does a flattened PDF look the same as the filled form in every PDF reader?
Yes, and this is one of the most important practical reasons to flatten. Fillable PDF form fields can render differently across PDF readers. Adobe Acrobat, Chrome's built-in viewer, Apple Preview, and mobile PDF apps all have slightly different engines for rendering form field values β font substitution, text alignment, and color rendering can all vary. A flattened PDF has no form fields: the content is just regular PDF page content, which renders identically in every conforming PDF reader. When you submit a form by email or upload it to a government portal, flattening guarantees the recipient sees exactly what you intended, regardless of which PDF reader they use.