
To compress a PDF to 5MB, open Dokurapi's free Compress PDF tool, choose your file, type 5000 in the Custom target (KB) box, press Compress PDF, and read the Output line before you download. The tool aims 6% under the number you type, so a 5000 KB target means a file of at most 4,700,000 bytes. If your PDF is already under that line, the tool tells you to use the original instead. Everything happens in your browser tab, so the document is not uploaded anywhere.
5 MB is a roomy limit for scanned documents. In our tests a five page scan of 7.83 MB came out at 612,872 bytes, a twelve page bundle of 18.72 MB at 1,452,321 bytes, and even a twenty four page bundle of 37.53 MB fitted at 2,934,776 bytes, all on the tool's sharpest setting. Below you will find the steps, why a 4.69 MB file and a 4.71 MB file get different treatment, the full results table, what rasterizing costs you, and what to do when a file must keep its text. For tighter limits see our guides to 2 MB, 1 MB and 500 KB.
Steps to compress a PDF to 5MB
You need a browser and the PDF, nothing else. No account, no app, and no watermark is added. The tool writes a new file and leaves the one you picked as it was.
- Check the size first. Our PDF size checker shows the exact bytes and the page count. If the file is under 4.7 MB, you may not need to compress it at all.
- Open Compress PDF and choose one file. The preset list stops at 2 MB, so 5 MB goes in the Custom target box.
- Type 5000 in Custom target (KB). The tool counts 1 KB as 1,000 bytes, so 5000 means 5,000,000 bytes, and the safe target becomes 4,700,000 bytes.
- Press Compress PDF. The status line counts up to 12 attempts, but for a 5 MB target the first, sharpest attempt usually fits.
- Read the Output line. It shows the size and the exact bytes, for example 2.93 MB (2,934,776 B).
- Download and open the file. Zoom into small print and stamps before you upload it anywhere.
The whole run took between 1.4 and 7.2 seconds in our tests on a laptop, depending on the page count. On a phone it takes longer, and our guide to compressing a PDF on a phone covers that case.

Ready to try it? The tool is free and runs in your browser.
Open the Compress PDF toolWhen the file is already under 5MB
Before the tool renders anything, it compares your file with the safe target. If the PDF is at or under 4,700,000 bytes, it stops and says the file does not need compressing. This is deliberate. Compressing rasterizes every page, which removes selectable text, links, form fields and digital signatures, so the tool will not do it when there is nothing to gain.
Our two three page scans show how close that line can be. The English copy weighed 4,693,486 bytes, just under the line, and was kept as it was. The Indonesian copy of the same layout weighed 4,712,343 bytes, only 12,343 bytes over, and went through the compressor, coming out at 373,006 bytes. Same kind of document, almost the same size, completely different outcome.

5MB as 5,000,000 or 5,242,880 bytes
A megabyte can mean two numbers. In the SI system used by NIST, mega means one million, so 5 MB is 5,000,000 bytes. Some software counts in powers of two, where 1 MiB is 1,048,576 bytes and 5 MiB is 5,242,880 bytes, about 4.9% more. A portal that says "5 MB" may be using either, and most do not say which.
Typing 5000 in Dokurapi assumes the stricter reading, and the 6% margin on top brings the safe target down to 4,700,000 bytes. A file made this way passes both readings with room to spare. If you have a file that sits between 4.7 and 5 MB and you are sure the portal counts in MiB, you can try the original first, but keeping the margin costs very little on a 5 MB limit.
| How the limit is read | Bytes | Our 4.69 MB scan | Our 4.71 MB scan |
|---|---|---|---|
| Dokurapi safe target (5000 minus 6%) | 4,700,000 | Under, kept as is | Over, compressed |
| 5 MB, decimal (SI) | 5,000,000 | Under | Under |
| 5 MiB, binary | 5,242,880 | Under | Under |
The table also shows why the 4.71 MB scan was compressed although it is technically under 5 MB: the tool keeps its safety margin on every target. For more on reading size labels see our guide to checking file size before upload.
Our 5MB test results
We used seven synthetic scans with no personal data: a one page letter, a two page form, a three page document, and bundles of five, eight, twelve and twenty four pages. They were made as image scans, the kind a phone scanner app or office copier produces, which is where most oversized PDFs come from. Four files were run through the tool with 5000 typed as the target. The one and two page files are well under the 4.7 MB safe line, so the tool keeps them as they are, and the eight page result is the first attempt size from the same raster code path as the tool.
| File | Original | Output | Attempt used | Fits 5 MB |
|---|---|---|---|---|
| 1 page letter | 1.50 MB | under target, original kept | none | Yes |
| 2 page form | 3.07 MB | under target, original kept | none | Yes |
| 3 page document | 4.69 MB (4,693,486 B) | original kept | none | Yes |
| 5 page bundle | 7.83 MB | 612,872 B | 1 of 12 | Yes |
| 8 page bundle | 12.48 MB | about 968 KB (attempt 1 size) | 1 of 12 | Yes |
| 12 page bundle | 18.72 MB | 1,452,321 B | 1 of 12 | Yes |
| 24 page bundle | 37.53 MB | 2,934,776 B | 1 of 12 | Yes |
Every file fitted on attempt 1, the sharpest of the twelve, which renders an A4 page about 714 pixels wide and saves it as JPEG at quality 78%. That works out to roughly 120 KB per scanned page. At that rate a scan of about 38 pages would still fit under the safe line on the sharpest setting, and the tool's smaller attempts would carry far more pages beyond that, but this is an estimate from our averages, not a test result.
What a 5MB result looks like, and what you lose
Because the first attempt fits, a 5 MB target gives you the best quality this tool produces: 714 pixel wide pages at JPEG quality 78%. For typed text, form boxes and stamps that is easy to read on screen and fine when printed small. Hairline signatures and very small print, such as the footnotes on a certificate, look softer than in the original scan.
The bigger cost is not sharpness but structure. Rasterizing turns each page into a single picture, so you can no longer select or search the text, links stop working, form fields are flattened, and a digital signature is removed. The tool says so in the status line every time. For a scan, that changes nothing, because a scan is already a picture. For a PDF exported from Word or a signed contract, it changes a lot.
That is why the tool refuses to touch a file already under the target, and why you should look at the type of PDF before compressing. Our guide to compressing a PDF without losing quality covers files that are mostly text.
When the PDF must keep its text or signature
Some portals check that a PDF has selectable text, or a contract must keep its digital signature. In those cases do not rasterize. Reduce the content instead.
- Remove pages the portal did not ask for. Blank backs of scans and cover sheets add weight. Our guide to deleting PDF pages shows how.
- Split the file. If the portal accepts several uploads, split the PDF into parts that each stay under the limit.
- Re-export from the source. A Word or spreadsheet file exported again to PDF is usually far smaller than a scan of the same pages.
- Rescan at a lower resolution. Many scanner apps default to very high settings; 150 to 200 dpi is enough for most forms.
- Sign last. If a document needs a signature, compress or assemble it first, then sign the final version with our sign PDF tool.
If several separate scans need to become one file under 5 MB, combine them first with Merge PDF and check the size before compressing. Our guide to merging PDFs for submissions covers page order and naming.
Common mistakes with a 5MB limit
- Compressing a file that already fits. You lose the text layer for nothing. Check the size first.
- Typing 5120 instead of 5000. It works if the portal counts in MiB, but fails if it counts in decimal megabytes. 5000 is the safer number.
- Uploading a 4.9 MB original to a strict portal. It is under 5,000,000 bytes, but some portals reject files close to the limit after adding their own overhead. A small margin avoids that.
- Merging everything into one giant file. If the form has separate upload slots, use them instead of forcing one file under the limit.
- Not opening the result. Always check that every page is there and readable before you submit.
For the opposite problem, a portal that sets a much smaller cap, see compressing a PDF to a specific size, and when a file stays too big after compressing, see what to do when a compressed file is still too big.
Frequently asked questions
How do I compress a PDF to 5MB for free?
Why does the tool say my PDF does not need compressing?
Should I type 5000 or 5120 for a 5MB limit?
Why did a 4.71 MB file get compressed if it is under 5 MB?
How many pages fit in 5MB?
Will compressing to 5MB make my PDF blurry?
Can I keep selectable text when compressing to 5MB?
Is my PDF uploaded to a server?
Sources
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