Introducing PDF Compressor: Reduce PDF File Size Entirely In-Browser

PDF Compressor is a browser-based tool that reduces PDF file sizes without sending your document to any server. It uses Ghostscript — the industry-standard PDF processor — compiled to WebAssembly, running entirely inside your browser tab. Text stays selectable, fonts are preserved, and nothing is uploaded.

Why Ghostscript, Not a Canvas Trick

Most browser-based PDF compressors take a shortcut: they render each page to an HTML Canvas as a JPEG image and pack those images back into a new PDF. This shrinks the file, but destroys all the underlying structure — text becomes unselectable, copy-paste stops working, and vector graphics lose their crispness at high zoom. Ghostscript doesn't rasterise. It processes the PDF natively: recompressing embedded images, removing redundant objects, downsampling where specified, and rewriting the file structure efficiently — while leaving text, fonts, and vector paths completely intact.

How the WASM Engine Works

Ghostscript is compiled to WebAssembly via Emscripten. On first use the browser downloads the ~16 MB WASM binary from jsDelivr CDN and caches it — subsequent compressions are instant. The input PDF is written to Ghostscript's virtual in-memory filesystem, processed with the pdfwrite device, and the output is read back and offered as a download. No data touches any server at any point.

Compression Presets

The tool exposes Ghostscript's four standard -dPDFSETTINGS presets. Screen targets 72 dpi and is best for email attachments and web embedding. eBook (the default) targets 150 dpi — a good balance for screen reading. Printer targets 300 dpi and is appropriate for documents that will be printed. Prepress is the highest quality option, colour-managed, for professional print workflows.

What Works Well

This tool is most effective on PDFs that contain high-resolution embedded images — scanned documents, exported slide decks, and reports with photographs. For purely text-based PDFs with no embedded images, Ghostscript can still reduce file size through object stream compression, but gains are modest.

Licence Note

Ghostscript is licenced under AGPL-3.0. This tool runs it entirely client-side via the @jspawn/ghostscript-wasm package — no server distribution involved.

Try It

Open PDF Compressor →

← Back to blogOpen PDF Compressor