Muqira
Contact
Muqira AI

AI writing & research workspace

Muqira Flow

Visual AI-powered workflow automation

SEOventra

SEO rank tracking & site audit

AlShorty

Smart URL shortener with deep analytics

Documateo

Browser-based PDF tools, privacy-first

3 live · 2 coming soon · 1 in labsView all products →
Building PDF Tools That Run Entirely in the Browser
DevelopmentDevelopmentPDF
All articles

Building PDF Tools That Run Entirely in the Browser

When we decided Documateo would never touch a server, we had no idea how many rabbit holes that decision would send us down. Here is the honest account.

DevelopmentPDFPrivacyBrowserWASMDocumateo
M

Muqira Team

Muqira Studio

10 min readFeb 18, 2026Article

Key Takeaways

  • 1Client-side processing is a genuine privacy advantage, not marketing — the file literally never leaves the device.
  • 2WebAssembly-based PDF libraries run 3–5× faster than pure JavaScript alternatives on files above 5MB.
  • 3Memory management in the browser is the unsolved hard problem in client-side PDF tooling — plan for it early.

Why client-side first

The decision to process PDFs entirely in the browser was not primarily a technical one. It was a values one. When someone uploads a document to a server — any server — they are making a trust decision. We did not want users to have to make that trust decision with us.

Library choices

The JavaScript PDF ecosystem is more fragmented than you might expect. We evaluated five libraries before settling on our current stack. PDF.js is the standard for rendering. For creation and editing we use pdf-lib. For compression and heavy operations we brought in a WebAssembly port of MuPDF.

The WASM tradeoffs

Using WebAssembly introduces a tradeoff. The WASM binary for our PDF processing is around 4MB. Loading a 4MB binary on first visit adds a perceptible delay — on a fast connection, maybe 600ms; on a slower connection, potentially several seconds.

We solved it with lazy loading: the WASM module only initialises when a user selects their first file. By then, they have committed to the task.

The unexpected UX problem

We expected the technical challenges. What we didn't anticipate was the UX problem that client-side processing creates: when something is happening inside the browser, it's hard to show meaningful progress.

Real-world performance

The WASM implementation handled 20MB files in roughly the same time the JavaScript implementation handled 5MB files. At 50MB the WASM library was 4.7× faster than the JavaScript alternative.

The memory problem

Memory management is unsolved. Browsers impose memory limits that vary by browser, by device, and by how much memory other tabs are consuming. Our current approach is chunked processing and graceful user communication.

✉️

Enjoyed this article?

Get new articles, product updates and insights from Muqira in your inbox.

Try Documateo — PDF tools that respect your privacy

Merge, split, compress, and convert PDFs entirely in your browser. No uploads. No accounts. No waiting.

Try Documateo free
Tags:DevelopmentPDFPrivacyBrowserWASMDocumateo

Found this useful? Share it.

Newsletter

Thoughts from the studio, monthly.

Product updates, long-form writing on SEO, design and development. No noise — just the things we actually think are worth reading.

No spam. Unsubscribe anytime. We send roughly once a month.

MuqiraMuqira
5 PRODUCTS
EST. 2025