Linearize a PDF for Fast Web View
Linearize PDF rewrites a file in the linearized layout, also called Fast Web View, so a viewer can show the first page before the whole file has downloaded. It usually makes the file slightly larger, not smaller.
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.
Linearize PDF rewrites the file with qpdf `--linearize`, writing a linearization dictionary and a page hint table so a web viewer can paint the first page before the whole document has arrived — Fast Web View.
This is its own operation at `/api/v1/misc/linearize-pdf`. It no longer routes through Compress PDF, so the download is genuinely linearized output rather than a plain recompress.
Linearizing usually makes the file slightly larger, because it adds the tables that let a viewer show page one before the download finishes. It does not downsample images or discard objects. When size is the goal, use Compress PDF instead.
Confirm the result with `qpdf --check`: a linearized file prints `File is linearized`. Password-protected files are unlocked for you on this page once you enter the password; API callers run Unlock first.
Measured on a local server, a 4-page text PDF of 51,844 bytes came back as 53,701 bytes, about 3.6% larger. `qpdf --check` printed `File is not linearized` for the input and `File is linearized` for the result. A 4-page image-only PDF grew from 11,407 to 12,272 bytes, and a 12-page spreadsheet export from 626,126 to 639,658 bytes. Growth of a few percent is the normal outcome, not a sign that something went wrong.
The operation takes only the file, with no fields. Running it on a file that is already linearized returned a file of the same size in the test (53,701 bytes), so a second pass is harmless but pointless. Protect also writes its output with `qpdf --linearize`, so a file that has been through Protect is already linearized and does not need this step.
Decide whether you need it at all. Linearizing helps when a PDF is published on a web page or served from a link and a viewer can fetch it in ranges. It does nothing for a file that travels as an email attachment or a portal upload and is opened after it has fully downloaded. If the goal is a smaller file, use Compress; if the file will not open cleanly, try Repair first.
Features
- qpdf `--linearize` — Fast Web View
- Output has the same pages, text, fonts and images; only the order of objects in the file changes
- A file that is already linearized comes back at the same size
- Needs no settings: the operation reads only the uploaded file
- Writes the linearization dictionary and page hint table
- Does not downsample images or alter page content
- Anonymous API at /api/v1/misc/linearize-pdf
When to use this tool
- Serve a large PDF page by page in a browser
- Hand a scanned report to a web viewer without a long blank wait
- Meet a portal's 'optimized for web' upload requirement
- Prepare a long catalog or manual before linking it from a web page, so a reader who only wants page 1 does not wait for all of it
- Normalize a mixed batch of PDFs from different export tools before hosting them, so every file has the same layout on disk
How do I linearize a PDF for fast web view?
- Upload the PDF you want prepared for Fast Web View.
- Click Process. There are no options.
- Download the linearized PDF.
- Run `qpdf --check` if you want to see the `File is linearized` line for yourself.
- Compare the two file sizes. A result a few percent larger than the original is expected; a result that is smaller or equal is also fine.
- If the upload is rejected as a damaged PDF, run Repair on the original and linearize the repaired copy.
Limits and edge cases
- Reorganises the file; it is not a size-reduction tool
- No image resampling
- Password-protected files need the password; API callers run Unlock first
- A file that qpdf cannot read is rejected as invalid; Repair is the tool to try first
- Whether a viewer actually shows page one early depends on the viewer and on the web server supporting range requests, which this tool cannot control
- Page content, fonts, bookmarks and form fields are not edited; only the file layout changes
- 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 40 MB scan stays about 40 MB but starts rendering on page 1 immediately
- `qpdf --check` on the download prints `File is linearized`
- A 4-page text PDF of 51,844 bytes comes back at 53,701 bytes, and `qpdf --check` changes from `File is not linearized` to `File is linearized`
- A 12-page spreadsheet export of 626,126 bytes comes back at 639,658 bytes: a 2% increase for the same 12 pages
- Uploading a plain text file renamed to .pdf returns 400 with `invalid_pdf` instead of a file
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
- Is the result linearized?
- Yes. The op passes `--linearize` to qpdf, so the output carries the linearization dictionary and the page hint tables.
- How is this different from Compress?
- Compress recompresses streams to save space. Linearize reorders the file for progressive download and leaves the content as it is.
- Will web viewers load page 1 first?
- That is the point of Fast Web View — provided the viewer fetches the file over HTTP and the server supports byte-range requests.
- Does it downsample images?
- No. Linearizing is a structural rewrite, not a quality reduction.
- Why is the linearized file larger than the one I uploaded?
- Linearization adds a hint table and a linearization dictionary so a viewer can locate page one without reading the whole file, and nothing is removed to pay for them. A 51,844-byte test PDF became 53,701 bytes. To shrink a PDF, use Compress.
- How can I tell whether a PDF is already linearized?
- Run `qpdf --check file.pdf`. It prints `File is linearized` for a linearized file and `File is not linearized` otherwise. A viewer's document-properties panel may also show a Fast Web View field, which can differ by application.
- What happens if I linearize the same file twice?
- Nothing useful. A linearized test file sent through again came back at the same size, 53,701 bytes, and `qpdf --check` still reported it as linearized.
- What error do I get for an encrypted or damaged file?
- An encrypted file is rejected with HTTP 400 and the reason `password_required`; the page asks for the password, while API callers run Unlock first. A file that is not a readable PDF is rejected with 400 and `invalid_pdf`, and the hint suggests Repair.
- Does Protect make the file linearized as well?
- Yes. The password operation writes its output with qpdf `--linearize` too, so protecting a file already gives you a linearized copy. Linearize on its own is for files that carry no password.
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/linearize-pdf" \
-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 Linearize PDF for you with this skill: /skills/pdf123-linearize-pdf.md
Files are used only for this processing job and deleted automatically afterward.