What this tool does
PDF Compressor builds a new PDF that may be smaller than the file you selected. It does not edit the original. The download is named from the source file with a -compressed.pdf suffix.
You choose one of four presets. Maximum, Balanced, and High quality rasterize pages. Repack only copies page objects into a new document without re-encoding them as images.
Choose this tool when…
- You need a lighter copy for email or an upload limit and can accept image pages from a raster preset.
- The PDF is mostly digital text and you want to try Repack only first so selectable text has a better chance of surviving.
- You only need the first N pages in the output, using the page-limit control.
How processing actually works
Inspection and compression run in the browser. pdf.js reads the PDF. Raster presets render each selected page to a canvas, optionally convert pixels to grayscale, encode JPEG, embed that JPEG with pdf-lib, and size the new page to the rendered viewport. Repack only uses pdf-lib copyPages and save({ useObjectStreams: true, updateFieldAppearances: false }).
Raster presets
- Maximum
- mode raster, scale 1, JPEG quality 0.52, grayscale on by default.
- Balanced
- mode raster, scale 1.25, JPEG quality 0.72, color by default. This is the default preset.
- High quality
- mode raster, scale 1.55, JPEG quality 0.88, color by default.
If a raster result is at least 98% of the original byte size, the tool tries a structure repack and keeps that file when it is smaller. The result records method as raster or structure and whether that fallback ran.
Supported files, outputs, and limits
- Input
- One PDF, up to 50 MB in the page UI.
- Output
- {original-base}-compressed.pdf
- Pages
- All pages, a typed range, or a first-N page limit. There is no separate hard page-count cap.
- Password
- No password field. Encrypted files may fail during inspection or compression.
Step-by-step workflow
- Upload one PDF up to 50 MB.
- Review source size, page count, and preview.
- Pick Maximum, Balanced, High quality, or Repack only.
- Use grayscale or a first-N limit only when you mean to.
- Click Compress PDF.
- Compare sizes, then inspect the download before replacing the original.
What changes in the output
Raster output pages are JPEG images. Page dimensions follow the pdf.js viewport at the preset scale, so size can change. Text is no longer selectable. Interactive features such as forms and links are not preserved on rasterized pages.
Repack only copies selected pages in source order. It can keep copied page sizes. Document-level bookmarks and attachments are not intentionally copied into the new PDF.
Important limitations and failure cases
- There is no target file-size control. You pick a preset; the tool does not chase an exact kilobyte count.
- Not every PDF becomes smaller. The UI can report little or no savings.
- Creating a new PDF typically invalidates certificate-based signatures.
- There is no dedicated cancel control after Compress PDF starts.
Privacy and where processing occurs
Compression stays in the browser. The selected PDF is not posted to a DevToolKit compression API. Ordinary site assets and the local pdf.js worker may still load.
How this differs from nearby DevToolKit tools
- PDF Split and PDF Page Extractor copy pages; they do not rasterize for size reduction.
- PDF to JPG / PDF to Image export page pictures as image files instead of a PDF.
- PDF Editor & Signer is a server-backed overlay editor, not a compressor.
Output review checklist
- Open the downloaded file and check readability at 100% zoom, especially on Maximum.
- Try selecting text if you used Repack only.
- Check links, forms, and signatures if those matter.
- Keep the original until you accept the new file.