Most online document and PDF tools work the same way: you drop a file, it uploads to a remote backend server, an automated queue processes it using an image or document library, and you download the converted output.
While convenient, this model introduces two fundamental problems:
- Privacy & Security Risks: Users are forced to upload tax records, financial statements, medical files, or legal contracts to third-party infrastructure with uncertain data-retention policies.
- Exponential Server Bills: Running conversion pipelines (like LibreOffice, Ghostscript, or headless Chromium) on server fleets burns significant CPU and memory.
To solve both problems, I built FileBreeze — an in-browser document processing suite where 100% of the computation happens locally on the client's device.
🛠️ The Architecture: Client-Side Document Processing
Instead of shuttling multi-megabyte payloads across the network to a heavy backend, FileBreeze brings the conversion engine directly into the client runtime using WebAssembly, modern JavaScript APIs, and HTML5 Canvas.
1. PDF Parsing & Generation
- Using client-side engines like
pdf-liband WebAssembly-compiled PDF runtimes, documents are parsed, split, and reconstructed as raw byte arrays directly in browser memory. - Merging and page extraction operate purely on binary streams without making any external API calls.
2. Lossy & Targeted KB Image Compression
For image compression and resizing, the tool calculates perceptual target byte limits in memory:
- Files are drawn to offscreen canvas contexts.
- Dimensions and compression levels are iterated with dynamic quantization to hit a targeted file size (e.g. compressing an image to under 100 KB) in fractions of a second.
3. Document Extraction & Translation
- For documents like Word (.docx) and spreadsheets (.xlsx), OpenXML structures are read and generated locally using zip and XML manipulation libraries, rendering layouts without relying on a remote LibreOffice instance.
💡 The Architectural Benefits
-
Zero Cloud Data Retention: Because files are processed entirely in browser memory (
BlobandArrayBuffer), no document bytes ever leave the user's computer. It delivers true, verifiable privacy. - $0 Compute Costs: Whether 100 people or 100,000 people convert a 50MB PDF on the site, our server bill is virtually $0 for processing power.
- Zero Server Queues: Users don't sit in a "Position 4 in conversion queue" waiting room. Conversions kick off instantly on the local CPU.
🔍 Try It Out & Share Your Feedback
The project is live at filebreeze.xyz.
I would love to hear thoughts from fellow devs:
- What edge-case file formats would you like to see handled client-side?
- Any performance bottlenecks you've encountered with large PDF manipulation in browser memory?
Drop your thoughts or questions in the comments!
Top comments (0)