How to Safely Compress Sensitive PDF Documents
Bank statements, contracts, and medical records should never be uploaded to a third-party server. Here's how to compress them safely without leaving your device.
PDFs are the universal container for sensitive documents — tax returns, employment contracts, medical reports. When those files are large, the temptation is to drag them into the first online compressor that appears in search results. This is a risk most people don't consciously take.
PDF is a complex format. A single file can contain embedded images, fonts, form data, digital signatures, and metadata layers. When you upload one to a third-party compressor, you're handing over all of that — including content that's not visible on any printed page.
What Actually Happens When You Upload to a Server-Side Tool
- ●The PDF is transmitted in full over HTTPS to a remote server
- ●The server decompresses and recompresses embedded images (typically to JPEG)
- ●Most tools log the filename, file size, and your IP address for every upload
- ●The file sits in a temp directory for 1–24 hours after processing
- ●Embedded metadata — including author name, modification history, and software version — is often preserved, not stripped
PDF/A documents (used for legal archiving) embed additional metadata including modification timestamps and creator identity. Most online compressors preserve this rather than strip it.
How Browser-Based PDF Compression Works
Compressing a PDF in-browser uses WebAssembly builds of tools like Ghostscript. The WASM binary is downloaded once (and cached), then executes locally inside your browser tab. The PDF content never crosses the network.
// Simplified: Ghostscript WASM running entirely in-browser
import { createGhostscript } from 'ghostscript-wasm';
const gs = await createGhostscript();
const pdfBytes = new Uint8Array(await file.arrayBuffer()); // stays in memory
gs.FS.writeFile('/input.pdf', pdfBytes);
gs.callMain([
'-sDEVICE=pdfwrite',
'-dPDFSETTINGS=/ebook', // 150 DPI — good quality, significant size reduction
'-o', '/output.pdf',
'/input.pdf',
]);
const result = gs.FS.readFile('/output.pdf');
// result is a Uint8Array — download it directly, nothing sent to a serverPractical Guide: Compressing Sensitive PDFs Safely
- 1.Choose a client-side tool — verify with DevTools → Network tab that no upload occurs during processing.
- 2.Pick the right compression level — /screen (72 DPI) for email; /ebook (150 DPI) for general use; /printer (300 DPI) for printing.
- 3.Verify the output — open the compressed file and confirm all text is legible and form fields are intact.
- 4.Clear your downloads folder on shared machines — temporary files can persist even after you close the tab.
Desktop Alternatives for Maximum Security
- ●Ghostscript — free, open-source, industry-standard, runs entirely offline
- ●LibreOffice Draw — can open and re-export PDFs with image compression settings
- ●qpdf — command-line tool that linearises, strips metadata, and removes restrictions
- ●Adobe Acrobat (paid) — the reference tool with clear and auditable data handling policies
For everyday documents that aren't highly sensitive, a good browser-based tool is fast, convenient, and safe. Try our PDF compressor — everything stays in your browser tab.
Ready to try it?
All tools run entirely in your browser — no uploads, no account required.
Compress PDF