DEV Community

Muath Aljehani
Muath Aljehani

Posted on

I built a PDF toolkit that never uploads your files — here's how

The Problem

Every time I needed to compress, merge, or convert a PDF, I had to
upload it to some website. Most of them store your file on their
servers for 24+ hours.

For personal documents, contracts, or anything sensitive — that's a
real privacy concern.

The Idea

What if all the processing happened locally in the browser?

Modern JavaScript is powerful enough to handle PDF manipulation
entirely client-side. No file ever needs to leave your device.

What I Built

opdf.io — 27 free PDF tools that run 100% in your browser.

Tools include:

  • Merge, split, compress, rotate
  • PDF → Word, JPG, PNG
  • OCR (works on scanned PDFs, supports Arabic)
  • Sign, protect with password, redact sensitive info
  • Watermark, page numbers, header & footer
  • And more

The Stack

  • React + TypeScript + Vite — frontend framework
  • pdf-lib — PDF creation and manipulation
  • PDF.js — PDF rendering
  • Tesseract.js — in-browser OCR
  • Mammoth — DOCX conversion
  • Cloudflare Pages — hosting and edge delivery

Interesting Challenges

OCR performance: Tesseract.js runs in a Web Worker to avoid
blocking the UI. Large scanned PDFs can take a while — showing
progress without freezing the page took some work.

Bundle size: Initial bundle was 648KB. After splitting
translations into 19 per-language chunks and lazy-loading all
tool pages, it's now 58KB — a 91% reduction.

PDF.js worker: Each page that uses PDF.js needs the worker
configured. Ended up creating a shared pdfjsWorker.ts that
exports the pre-configured library.

What's Next

  • More tools based on user feedback
  • Improve mobile experience
  • Performance improvements for large files

Happy to answer questions about the architecture or any specific
implementation details.

https://opdf.io

Top comments (4)

Collapse
 
mreeves_tools profile image
Mark Reeves •

solid build. the never uploads guarantee is easier to claim than verify - we keep swapfile.live honest by simply having no upload endpoint at all, so there's nothing to leak. how do you prove yours to skeptical users? devtools demo or something fancier

Collapse
 
gesslar profile image
gesslar •

This would be interesting as first-class citizens in a Tauri app. Like my markdown viewer. Too much is online anymore. This is neat though. Gz on the release!

Collapse
 
muath_aljehani_9d9238bb3a profile image
Muath Aljehani •

Thanks a lot! I totally agree with you about too many things being cloud-based nowadays. The good news is, you can actually install it directly from your browser right now (as a PWA) and use it 100% offline!

Collapse
 
muath_aljehani_9d9238bb3a profile image
Muath Aljehani •

FYI : now it's 42 tools :)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.