How Our Technology Works

Every PDF tool on this site processes files entirely in your browser. No uploads, no servers, no cloud storage. Here is exactly how we do it.

Client-Side vs Server-Based Processing

Most online PDF tools follow the same pattern: upload your file, wait for a remote server to process it, then download the result. PDF Smaller takes a fundamentally different approach.

Other Tools (Server-Based)

1You upload your file to their server
2Their server processes the file
3You download the result from their server
4Your file may remain on their server
Your file travels across the internet and exists on someone else's computer.

PDF Smaller (Client-Side)

1You load the website (JavaScript downloads once)
2You select a file (stays on your device)
3Your browser processes the file locally
4You save the result directly to your device
Your file never leaves your device. No network transfer, no server storage.

PDF Processing Engines

PDF Smaller uses a suite of specialized JavaScript libraries, each handling a different aspect of PDF processing. All run directly in your browser.

pdf-lib

Create and modify PDFs

The workhorse for PDF manipulation. Handles merging, splitting, rotating, reordering pages, adding watermarks, and modifying document metadata. Works by parsing and reconstructing PDF byte streams directly in JavaScript.

PDF.js

Mozilla's PDF renderer

Built by Mozilla for Firefox, PDF.js renders PDFs into canvas elements for previews and extracts text content for search and OCR preparation. Also powers the compression pipeline by rendering pages into images for re-optimization.

jsPDF

Generate new PDFs

Creates new PDF documents from scratch. Used for converting images to PDF, generating PDFs from HTML content, and assembling compressed output. Particularly useful for the JPG-to-PDF and HTML-to-PDF conversion tools.

Custom RC4 Engine

Hand-built encryption in 7KB

A purpose-built RC4 128-bit encryption engine for password-protecting PDFs. Written from scratch to avoid pulling in large cryptography libraries. Handles both user and owner passwords with standard PDF permission flags.

Web Worker Architecture

Heavy PDF operations run in background threads called Web Workers, keeping the interface responsive while your files are being processed.

UI

Main Thread (User Interface)

Handles file selection, progress bars, previews, and user interaction. Stays responsive at all times because no heavy computation happens here.

Messages passed via Comlink (typed RPC)

W1

Worker 1: PDF Rendering

Renders PDF pages into image data using PDF.js. Each page becomes a high-resolution canvas that feeds into the compression pipeline.

W2

Worker 2: Image Compression

Runs MozJPEG WebAssembly to optimize rendered page images. Quality settings (low, medium, high compression) control the JPEG quality parameter.

W3

Worker 3+: Parallel Processing

For batch operations, additional workers spin up based on your CPU core count (up to 4). Small files process in parallel; large files process sequentially to manage memory.

Dynamic Concurrency

The worker pool adapts to your file sizes and device capabilities:

Files under 50MB

4 concurrent

Files 50-200MB

2 concurrent

Files over 200MB

Sequential

OPFS Storage for Large Files

The Origin Private File System gives PDF Smaller fast, temporary storage without overwhelming your browser's memory.

What is OPFS?

OPFS (Origin Private File System) is a modern browser API that provides a private, high-performance file system scoped to the website. Unlike regular browser storage, it handles large binary data efficiently and is accessible from Web Workers.

  • Handles files up to 1GB without crashing the tab
  • Much faster than IndexedDB for large binary data
  • Private to this site; no other website can access it

How We Use It

During compression, intermediate data (rendered pages, optimized images) is stored in OPFS rather than held in RAM. This keeps peak memory at roughly 150MB even for 1GB files.

  • Each job gets a unique session ID to isolate data
  • All temporary files are cleaned up after processing
  • Incognito mode detected; users warned about limits

The Compression Pipeline

PDF compression works by re-rendering each page and optimizing the resulting images with industry-leading WebAssembly codecs.

1

Page Rendering

PDF.js renders each page of the input PDF to a high-resolution canvas element. This captures all content, including text, vector graphics, and embedded images, as pixel data.

2

MozJPEG Optimization

Each rendered page image is passed to MozJPEG, compiled to WebAssembly for near-native speed. MozJPEG produces smaller JPEG files than standard encoders at the same visual quality. Three quality tiers are available: low compression (best quality), medium (balanced), and high compression (smallest size).

3

OPFS Staging

Compressed page images are written to the Origin Private File System instead of accumulating in memory. This is what allows processing of very large files without exhausting available RAM.

4

PDF Assembly

The optimized images are assembled into a new PDF document with correct page dimensions. The result is a valid PDF that opens in any reader, typically 80-95% smaller than the original for image-heavy documents.

How to Verify We Don't Upload Files

You do not have to take our word for it. Here is how to confirm for yourself that your files stay on your device.

1

Open Browser DevTools

Press F12 on Windows/Linux or Cmd + Option + I on Mac. This opens your browser's developer tools.

2

Switch to the Network Tab

Click the "Network" tab at the top of DevTools. This shows every request your browser makes to any server.

3

Clear Existing Requests

Click the clear button (circle with a line) to remove existing entries so you start with a clean slate.

4

Process Any File

Go to any tool (e.g., Compress PDF) and process a file normally.

5

Observe the Results

You will see zero outgoing requests containing file data. The only network activity is analytics (page view tracking). No POST requests, no file uploads, no multipart form data. This is a static website with no backend endpoint to receive files.

For extra assurance: You can even disconnect from the internet after the page loads and process files completely offline. The tool will continue to work because all code runs locally in your browser.

Frequently Asked Questions

Does PDF Smaller upload my files to a server?

No. All processing happens entirely in your browser using JavaScript and WebAssembly. Your files never leave your device. You can verify this yourself by monitoring the Network tab in your browser DevTools while processing a file.

How can a browser-based tool handle large PDF files?

PDF Smaller uses the Origin Private File System (OPFS) for temporary storage during processing, Web Workers for parallel processing across multiple CPU cores, and streaming techniques that keep memory usage low. Files up to 1GB can be processed with peak memory usage around 150MB.

What happens to my files after processing?

Files exist only in browser memory or temporary OPFS storage during processing. Once you download the result or close the tab, all data is automatically cleaned up. There is no persistent storage and no way to recover files after the session ends.

Does PDF Smaller work offline?

You need an internet connection to load the website initially. Once the page and its JavaScript libraries are loaded, all PDF processing works without any network connection. The tool does not contact any server during file processing.

Why is client-side processing slower than server-based tools for very large files?

Server-based tools run on powerful dedicated hardware, while client-side tools use your device processor. For most files under 100MB, the difference is negligible because you skip the upload and download time entirely. For very large files, the trade-off is slightly longer processing time in exchange for complete privacy.

What browsers are supported?

PDF Smaller works on all modern browsers including Chrome, Firefox, Safari, and Edge. It uses standard web APIs like Web Workers, WebAssembly, and the Origin Private File System. For the best experience with large files, use Chrome or Edge on a desktop device.