Compress PDF files
- Runs in your browser
- No signup
- Formula shown below
- Reviewed
Compressing a PDF reduces its file size by rendering each page at a lower resolution and re-encoding it as a JPEG image. A 20 MB scanned document rendered at 110 DPI with 60% JPEG quality typically drops to between 1 MB and 3 MB. The trade-off is real: selectable text, hyperlinks and form fields do not survive rasterisation.
How to compress a PDF
- 01
Add your PDF
Drag a single PDF onto the drop zone or click to choose one. The page count is read and shown immediately.
- 02
Set the resolution
Choose a DPI. Use 72 to 110 for documents that will only be read on screen, and 150 for anything that needs to be printed legibly.
- 03
Set the image quality
Lower the JPEG quality for further savings. Around 60% is usually indistinguishable from the original on a scanned page.
- 04
Consider greyscale
Turn on greyscale for black-and-white scans and text documents. It typically removes a further 20 to 30% with no visible change.
- 05
Compress and download
Press Compress PDF. Each page is rendered and re-encoded in this page, then the finished file is offered as a download.
The formula
pixels per page = (width_pt ÷ 72 × DPI) × (height_pt ÷ 72 × DPI); size = pixels × bytes-per-pixel(quality)
- width_pt, height_pt
- Page dimensions in PDF points, where 72 points equal one inch.
- DPI
- Dots per inch the page is rendered at. 72 is screen resolution; 150 is comfortable for print.
- quality
- The JPEG quality factor from 0 to 1, controlling how aggressively detail is discarded.
- pixels per page
- The rasterised page area, which scales with the square of DPI.
File size scales with the square of DPI: halving from 220 to 110 DPI cuts the pixel count to a quarter. That is why resolution is the most powerful control here, and why moving the DPI slider does far more than the quality slider on a scanned document.
Worked example
- Source
- scanned-contract.pdf — 12 pages, 18.4 MB
- Resolution
- 110 DPI
- Image quality
- 60%
- Greyscale
- Off
- Result
- scanned-contract-compressed.pdf — about 1.9 MB, a 90% reduction
An A4 page is 595 × 842 points. At 110 DPI that renders to 595 ÷ 72 × 110 = 909 pixels wide and 842 ÷ 72 × 110 = 1,286 pixels tall, about 1.17 megapixels. At 60% JPEG quality a photographic page of that size encodes to roughly 150 kB, so 12 pages land near 1.8 MB plus PDF structure. The same document at 220 DPI would be four times the pixel count and roughly four times the size.
Frequently asked questions
How do you reduce the size of a PDF?
The dominant cost in almost every large PDF is its images, so reducing size means reducing pixel count and image quality. This tool renders each page at a chosen DPI and re-encodes it as a JPEG. Lowering resolution from 220 to 110 DPI cuts the pixel count to a quarter, which is a far larger saving than any change to the quality slider alone.
How do you compress a PDF to a specific size like 100 KB?
Choose the size from the target list instead of setting resolution by hand. The compressor renders a pass, measures the result and recalculates: output bytes scale with pixel count and pixel count with the square of resolution, so one measured pass predicts the resolution the target needs. Two passes is typical. Upload forms most often cap at 100 KB, 200 KB, 1 MB or 2 MB.
What happens if a PDF cannot reach the target size?
The compressor reports that the target was missed and returns the smallest file it managed, naming the resolution it stopped at. It will not keep degrading a document past the point of legibility to hit a number. A long scan is the usual cause, and splitting it into parts then compressing each is normally better than making every page unreadable.
Does compressing a PDF remove the selectable text?
Yes, and that is the central trade-off. Rasterising a page turns everything on it into a single image, so text is no longer selectable, searchable or reachable by a screen reader, and hyperlinks and form fields stop working. For a scanned document nothing is lost, because the text was already an image. The step is irreversible, so keep the original: lossless optimisation preserves text but typically saves only 5 to 15%.
What DPI should be used for a compressed PDF?
Use 72 to 110 DPI for documents that will only be read on a screen, where the display itself rarely exceeds about 110 effective DPI. Use 150 DPI for anything that will be printed and needs to stay legible. Above 200 DPI there is little size left to save, since the file approaches the original.
Why did compression barely shrink my PDF?
A text-only PDF is already extremely efficient — a page of text may be only a few kilobytes, because it stores characters and font references rather than pixels. Rasterising such a page can even make it larger. Compression pays off on scanned documents and image-heavy reports, and is usually the wrong tool for a text-native file.
Does greyscale conversion actually help?
For black-and-white scans and text documents, greyscale usually removes a further 20 to 30% because the two chroma channels are discarded entirely. Conversion uses the Rec. 709 luma weights of 0.2126 red, 0.7152 green and 0.0722 blue, which match human brightness perception; averaging the three channels equally produces a noticeably muddier result.
Is the PDF uploaded anywhere during compression?
No. Pages are rendered by pdf.js and rebuilt by pdf-lib, both running as JavaScript inside this page, using the browser's own canvas and JPEG encoder. The file is read from local disk into memory and written back out as a download. This site has no server-side code capable of receiving a document.
Sources
- ISO 32000-2 — Portable Document Format — International Organization for Standardization
- JPEG (ISO/IEC 10918) — image compression standard — Joint Photographic Experts Group
- pdf.js — PDF rendering in the browser — Mozilla
Last reviewed: · Formula and sources verified by Syed Aqeel Ahmad Gillani. See the methodology for how every calculation is derived.