How I Built an In-Browser, Zero-Upload PDF Merger & Converter Using WebAssembly and Canvas
Description and use
A client‑side PDF merger built with WebAssembly and pdf‑lib, eliminating uploads, size limits, and subscription costs.
Problem
Online PDF utilities force users to upload sensitive documents to remote servers, imposing file size limits, subscription fees, and privacy risks.
Outcome
The implementation allows users to merge PDFs entirely in the browser, avoiding uploads and associated costs while preserving privacy.
Workflow
- 1. User selects PDF files in the browser
- 2. Files are read as ArrayBuffers
- 3. pdf‑lib loads each PDF into memory
- 4. Pages are copied and appended to a new PDFDocument
- 5. The merged PDF is saved to a Blob and a download URL is generated
- 6. User downloads the merged PDF locally
Evidence
Whenever you search for a simple utility like "Merge PDF" or "Convert WebP to PNG", you are usually greeted by the same frustrating experience: 1. A 15MB file upload limit behind an aggressive paywall. 2. A subscription pop‑up asking for $12/month. 3. Your sensitive personal documents (tax returns, signed contracts, medical records) getting uploaded to an untrusted remote server.
There is zero technical justification for uploading a document to a cloud server just to merge two pages or change an image format.
We can load the document structure directly into browser memory using pdf‑lib:
- Record date: 2026-10-07T23:40:55.580Z