Flatten a PDF
Flatten PDF turns annotations and form-field appearances into fixed page content with qpdf, so they can no longer be edited. It is not rasterization: text that was already page content stays selectable.
Drag and drop files here, or click to choose
Accepts PDF · up to 500.0 MB per file · up to 20 files at once
You can also paste a file with Ctrl/Cmd+V, or from the clipboard menu.
Flatten runs `qpdf --flatten-annotations=all`. Appearance streams for annotations become page content. The form field `flattenOnlyForms` is ignored; there is no forms-only mode.
Widgets may stop being fillable. Comments and markup that qpdf can flatten become ink on the page. Password-protected files are unlocked for you on this page once you enter the password; API callers run Unlock first.
This is not rasterization and not Print to PDF. Text that was already page content stays selectable when the structure allows.
If you needed to drop annotations instead of baking them in, that is a different sanitize-style job.
The practical difference is between an interactive page and a finished page. In a fillable PDF, a text field is an annotation (a widget) sitting above the page; the viewer draws its value from an appearance stream and lets you click into it. After flattening, that appearance is drawn as part of the page itself and the widget is gone. The same applies to highlights, sticky-note icons, stamps and free-text boxes: what you saw becomes permanent page content.
Use it when the file is about to leave your hands and the recipient should see exactly what you see. Typical moments are after the last form field is filled, after a reviewer's markup is accepted, and before an archive or an upload portal that rejects interactive fields. Do not use it while the document still needs edits, because the former fields cannot be typed into again.
The page is rewritten by qpdf, so the file is re-serialised even when there was nothing to flatten. Page content, fonts and images are carried over unchanged. What changes is the annotation layer. Because the tool takes no options, there is no way to flatten one comment and keep another; if you need that, remove the unwanted annotations first and flatten the rest.
A field whose appearance stream was never generated may flatten to nothing. Some producers save forms without appearance streams and rely on the viewer to draw them; qpdf can only bake in an appearance that exists. If a flattened field comes out blank, open the original, re-save it from a viewer that writes appearances, and flatten the re-saved copy.
Features
- qpdf `--flatten-annotations=all`
- `flattenOnlyForms` unused
- Not a raster flatten
- Anonymous API at /api/v1/misc/flatten
When to use this tool
- Freeze filled form appearances before an archive
- Turn review markup into page content
- Stop a viewer from showing editable widgets
- Send a completed application to a portal that rejects fillable fields
- Make sure a recipient's viewer cannot change a value you entered
How do I flatten a PDF?
- Upload a PDF that has annotations or form appearances you want baked in.
- There are no options; every annotation qpdf can flatten is included.
- Click Process and download the PDF.
- Try to edit a former field. It should no longer behave as a widget.
Limits and edge cases
- No forms-only mode
- Can invalidate signatures
- Password-protected files need the password; API callers run Unlock first
- Cannot recover a field that had no appearance stream
- Not reversible: keep the original if you may need the fields again
- Upload limit on this website: 500 MB per file, sent in chunks above about 95 MB. A single direct API request body is capped at 100 MB.
Examples
- A filled AcroForm often becomes static text and borders on the page
- Comments and markup on the page are flattened together with the form fields
- A two-page tax worksheet with typed amounts in its fields downloads with the same numbers printed on the page, and clicking where a field was does nothing
- A contract with a yellow highlight and a text-box comment keeps both as drawn content, so a later reader cannot delete them in a viewer's comment pane
Privacy for this tool
Files are uploaded over HTTPS, processed in memory or a short-lived temporary directory on our servers, and deleted when your result is ready. We do not keep copies for later browsing, training, or advertising profiles. See the Privacy Policy for retention details and AdSense cookie disclosures.
Frequently asked questions
- Can I flatten forms but keep comments?
- No. There is no forms-only mode; every annotation qpdf can flatten is flattened.
- Will signatures still validate?
- Flattening appearances usually breaks cryptographic signatures. Validate first if that matters.
- Is this the same as printing to PDF?
- No. qpdf merges annotation appearances into content. It does not reprint the page as an image.
- What if there are no annotations?
- You still get a qpdf rewrite. Visual change should be none.
- Why is a field blank after flattening?
- The field had no appearance stream, so there was nothing for qpdf to draw. Open the original in a viewer, fill or re-save it so appearances are written, then flatten again.
- Can I undo flattening?
- Not from the flattened file. The widgets no longer exist, so keep the editable original and send the flattened copy.
- Will flattening make the file smaller or protect it from copying?
- Neither is promised. It changes how annotations are stored, not compression, and text that was selectable on the page stays selectable. It is not a security feature.
- Which tool should I use if I want the pages as pictures?
- Use PDF to Images and then Image to PDF. That rasterizes every page, unlike Flatten, which keeps vector text and fonts.
- Does Flatten fix a form that will not let me type?
- No, it does the opposite and removes the ability to type. If a form will not accept input, the problem is in the form or the viewer, not something flattening cures.
Last updated:
Call this from code
Every tool on this site is a plain REST endpoint - no account or API key needed for anonymous use. Built for AI agents and developers as much as for browsers.
curl -X POST "https://pdf123.xyz/api/v1/misc/flatten" \
-F "[email protected]" \
-o output.pdfAlso available as an MCP tool for agent clients that speak Model Context Protocol (JSON-RPC 2.0 over POST /mcp). Full API reference
Use it from an AI agent
SkillClaude Code, Codex, Cursor and other AI agents can run Flatten for you with this skill: /skills/pdf123-flatten.md
Files are used only for this processing job and deleted automatically afterward.