PDF

How to compress a PDF to 400KB without uploading it

A 400 KB limit sounds generous until the PDF has ten pages. Here are the steps, how the tool picks a result, and what happened when we squeezed a 2, 5 and 12 page scan under the same limit.

Updated ยท 11 min read

Featured image: How to compress a PDF to 400KB without uploading it, with a real screenshot of the Compress PDF tool tool on Dokurapi
Inside the frame: a real screenshot of the Dokurapi tool. All processing runs in the browser, nothing is uploaded.

To compress a PDF to 400KB, open Dokurapi's free Compress PDF tool, choose your file, type 400 in the Custom target (KB) box, press Compress PDF, and read the Output figure before you press Download PDF. The tool aims 6% below your number, so a 400 KB target produces a file of at most 376,000 bytes. Everything runs in your browser tab and the file is never uploaded. In our test, a 3.07 MB two page scanned form came out at 226,353 bytes in under a second, and even an 18.72 MB twelve page bundle fitted at 304,585 bytes.

The catch is the page count. A 400 KB limit is one budget for the whole file, so every extra page gets a smaller share. This guide covers the steps, how the tool decides the result, the numbers from three test files, and what to do when the pages come out too soft to read. If the rules for other sizes are what you need, see our guides to 300 KB and 500 KB.

Steps to compress a PDF to 400KB

You need no account and no app. Keep the original PDF somewhere safe, because the tool only creates a new copy and never changes the file you chose.

  1. Check the current size first. If the PDF is already below 400 KB, you are done. Our PDF size checker shows the exact size and the number of pages.
  2. Open the Compress PDF tool and choose one PDF. The preset menu offers 100 KB, 200 KB, 500 KB, 1 MB and 2 MB. There is no 400 KB preset, which is why the next step matters.
  3. Type 400 in the Custom target (KB) box. A custom number always wins over the preset menu. Our first screenshot below shows 400 typed while the menu still says 500 KB.
  4. Press Compress PDF. Short files finish in about a second. Our twelve page bundle took about 40 seconds on a laptop, because the tool had to try every setting.
  5. Read the result box. It shows the original size, the output size in KB and in exact bytes, and the size difference.
  6. Open the downloaded file and zoom in. Check that names, numbers, stamps and signatures are still readable before you upload anything.
Dokurapi Compress PDF tool with 400 typed as the custom target, showing a 3.07 MB file reduced to 226 KB (226,353 bytes)
Our first test in the live tool: a synthetic two page scanned form of 3.07 MB with 400 typed in Custom target (KB). The safe target was reached at 226 KB (226,353 bytes) and the status line warns that pages were rasterized.

Ready to try it? The tool is free and runs in your browser.

Open the Compress PDF tool

How the tool decides the 400KB result

The compressor does not guess one setting. It turns each page into a picture and saves that picture as a JPEG, then measures the whole file. It has a ladder of 12 possible attempts: four page widths (scales 1.2, 1, 0.82 and 0.68 of the PDF page size, which is 714, 595, 488 and 404 pixels wide for an A4 page) combined with three JPEG qualities (78%, 64% and 50%). The quality numbers are passed to the browser's image encoder, described in MDN's toDataURL reference.

The ladder starts at the sharpest combination and walks down. As soon as one attempt is at or under the safe line, the tool stops and offers that file. For 400 KB the safe line is 400 x 1,000 x 0.94 = 376,000 bytes. The tool counts 1 KB as 1,000 bytes, the decimal convention explained by NIST, and the 6% margin covers portals that count 1 KB as 1,024 bytes or round sizes differently.

Because it stops at the first attempt that fits, you get the sharpest version that obeys the limit, not the smallest possible file. If none of the 12 attempts fits, it shows the smallest one it made and says the target was not reached. The same logic sits behind every size in our guide to compressing a PDF to a specific size.

Twelve bars for the twelve compression attempts on a 5-page scan, with a dashed safe line at 376,000 bytes and attempt 3 marked as the stopping point
All 12 possible attempts for our 5 page scan, measured with the same code the tool uses. Attempts 1 and 2 were above the 376,000 byte safe line, attempt 3 (714 px pages at quality 50%) fitted at 336,851 bytes, so attempts 4 to 12 were never made.

What the live tool returned in our tests

We made three synthetic scans with no personal data: plain paper texture, scanner noise, and lines of sample text, saved as high quality JPEG pages inside a PDF. This is the kind of file a phone scanner app or an office copier produces, and it is the kind that is usually too big for an upload form. Each file went through the live tool with a 400 KB custom target, and we also ran the same files at 200 KB to see the difference.

Compress PDF to 400KB: results on three scanned PDFs (English test files, November 2026)
Test fileOriginalResult at 400 KBAttempt usedResult at 200 KB
2 page form3.07 MB226,353 B1: 714 px, 78%158,030 B
5 page bundle7.83 MB336,851 B3: 714 px, 50%181,363 B
12 page bundle18.72 MB304,585 B12: 404 px, 50%304,585 B, target not reached

Three things stand out. First, every file fitted under 400 KB, even the 18.72 MB one. Second, the result is not always close to 400 KB: the two page form landed at 226 KB because the very first attempt already fitted, and the tool never makes pages sharper than its top setting. Third, the twelve page bundle only fitted at the last rung of the ladder, and at 200 KB it could not fit at all. The limit was the same, the page count was not.

Why the number of pages matters more than the file size

A scanned PDF is mostly pictures, one per page. When you compress it, you are deciding how many bytes each page picture may use. Divide 400 KB by the number of pages and you get the budget per page, before the small overhead of the PDF structure itself.

In our tests the two page form used about 113 KB per page and kept the sharpest setting. The five page bundle used about 67 KB per page and had to drop JPEG quality to 50%. The twelve page bundle used only about 25 KB per page, which forced the tool down to 404 pixel wide pages. At that width a line of normal body text is only a few pixels tall, so small print and handwriting start to blur.

This is why the original file size tells you little. An 18 MB file of twelve light pages can fit, while a 5 MB file of thirty pages may not. If a form asks for several documents, it is often better to upload them as separate PDFs, each with its own 400 KB budget, than to merge them into one. Our guide to merging PDFs for submissions explains when one file is really required.

Three stacks of pages, 2, 5 and 12 pages, each with its 400 KB result, the attempt used and the size per page
The same 400 KB limit shared by more pages. The 2 page form kept the top setting at about 113 KB a page, the 5 page bundle kept full width at quality 50%, and the 12 page bundle only fitted with 404 px pages at about 25 KB a page.

How the pages look after compressing to 400KB

Numbers are only half the story, so we rendered the first page of the five page bundle from three files: the original scan, the 400 KB result and the 200 KB result. All three are shown at the same size in the crop below.

At 400 KB the heading and the body text are still clean, with some softening around the letters, the typical look of JPEG at quality 50%. At 200 KB the tool had to switch to 488 pixel wide pages, and the small text becomes visibly rough. You can still read it on screen, but a reviewer who zooms in to check a number or a stamp will see the difference straight away.

That is the practical reason to use the full limit a form allows. If the portal accepts 400 KB, compressing to 200 KB just in case throws away detail for nothing. When text must stay selectable or a digital signature must remain valid, raster compression is the wrong tool altogether; our article on compressing a PDF without losing quality covers those cases.

Three side by side crops of the same page heading and text: original scan, 400 KB result and 200 KB result
The same corner of page 1 from the original 7.83 MB scan, the 400 KB result (714 px, quality 50%) and the 200 KB result (488 px, quality 50%), rendered at the same zoom. The 400 KB copy stays crisp enough to read small text.

When the 400KB target is not reached

If all 12 attempts are above 376,000 bytes, the status line says the smallest result was created but the target was not reached. Nothing is wrong with your file; it simply has more page area than 400 KB can hold at the lowest setting. Our twelve page test bundle would have reached that point with a few more pages, since its last attempt already used 304,585 bytes.

You have four honest options, in this order:

  1. Remove pages the form did not ask for. Blank backs, instruction sheets and duplicate copies all cost bytes. Our guide to deleting PDF pages shows how.
  2. Split the file. If the form has separate upload fields, give each document its own file. See how to split a PDF.
  3. Rescan at a lower resolution. A scan at 150 to 200 dpi in grayscale starts much smaller than a 300 dpi color scan. Our guide to scanning a document to PDF explains the settings.
  4. Ask whether a bigger limit applies. Some portals set a different limit for each upload field, so read the instructions for the field you are using.

For the general reasons a compressed file stays big, read why a compressed file is still too big.

When not to compress a PDF to 400KB this way

Raster compression is the right tool for scans, photos of documents and image heavy PDFs. It is the wrong tool in three situations, and the status line in the tool says so every time it finishes.

  • The PDF is already small. A typed letter exported from a word processor is often well under 400 KB. Turning its text into pictures can make it bigger, and the tool refuses to offer a result that is larger than the original. Check first with the size checker.
  • The PDF has a digital signature or fillable fields. Rasterizing removes the signature data, form fields and links. A visible signature image survives as a picture, but its cryptographic proof does not.
  • Someone must copy text out of the file. After compression the pages are images, so text can no longer be selected or searched.

In those cases, compress the source instead: export again from the original document with smaller images, or rescan with lighter settings. If you only need to know how a limit like 400 KB compares with megabytes, our page on converting KB to MB shows the arithmetic.

Check the file before you upload it

A short final check saves a rejected application. Open the downloaded PDF, not the original, and go through this list:

  • The file size in your file manager is under 400 KB. Windows Explorer and some phone file apps round sizes, so look at the exact byte count if the number looks close.
  • Every page is present and in the right order. Our guide to checking PDF page order has a quick routine.
  • Names, ID numbers, dates and amounts are readable at 100% zoom.
  • Stamps, signatures and photos are still recognizable.
  • The file name is what the form expects, without extra symbols.

If the portal also states a page limit or a format such as PDF only, check those too. Our checklist for checking file size before upload walks through the common rejection reasons. Then upload, and keep both the original and the compressed copy until the application is confirmed.

Dokurapi Compress PDF tool result for an 18.72 MB twelve page PDF with a 400 KB custom target, output 305 KB
The hardest test: an 18.72 MB twelve page bundle with a 400 KB custom target. The tool reached the safe target at 305 KB (304,585 bytes), but only on its last attempt with 404 px pages.

Frequently asked questions

How do I compress a PDF to 400KB for free?
Open the Dokurapi Compress PDF tool, choose the PDF, type 400 in the Custom target (KB) box, press Compress PDF and download the result. It is free, needs no account, and the file stays in your browser.
Why is my compressed file much smaller than 400KB?
The tool stops at the first and sharpest setting that fits under the safe line of 376,000 bytes. If even the sharpest setting is small enough, as with our 2 page form at 226,353 bytes, it does not make the file sharper or bigger to fill the limit.
Is 400KB the same as 0.4MB?
Yes in decimal units, where 1 MB is 1,000 KB. Some systems use 1,024, which makes 400 KB about 0.39 MB. The tool aims 6% below your target so both interpretations are covered.
How many pages can fit in a 400KB PDF?
It depends on what is on the pages. In our tests a 12 page scan of text fitted at 304,585 bytes, but only with 404 px wide pages. Photo heavy pages or color scans use more bytes, so fewer of them fit.
Will the text in my PDF still be selectable after compressing?
No. The tool turns each page into a JPEG image, so text can no longer be selected or searched, and form fields, links and digital signatures are removed.
Is my document uploaded to Dokurapi?
No. The PDF is read and compressed by your browser on your own device. The page loads its PDF libraries from dokurapi.com, but your file itself is never sent to a server.
What if the tool says the target was not reached?
Remove pages that are not required, split the file into separate documents, or rescan at a lower resolution in grayscale. Then run the tool again with the same 400 KB target.
Can I compress a PDF to 400KB on my phone?
Yes. The tool works in mobile browsers such as Chrome and Safari. Long files take longer on a phone, so keep the screen on until the result box appears.

Sources

  1. Prefixes for binary multiples, NIST
  2. HTMLCanvasElement: toDataURL() method, MDN Web Docs

Need help?Result not quite right, or unsure about a form rule? Ask Dokurapi support on WhatsApp. Please do not send personal documents in chat.

Chat on WhatsApp

Related articles

Try Dokurapi for Free

No account needed. Pick a tool, drop in a file, and download the result, free.