DEV Community

Abhishek
Abhishek

Posted on

How I Built a Privacy-First OCR Web App That Runs Entirely in Your Browser

I've been building SnapPDF — a web app that turns screenshots into clean, searchable PDFs. The key constraint: images never leave the browser.

The Problem

Everyone takes screenshots of notes, receipts, and documents. But those screenshots are just pixels — you can't search them, copy text from them, or share them as proper documents.

Built-in OCR on phones is unreliable, especially for handwritten text. And most OCR tools require uploading your images to a server.

The Solution

SnapPDF runs Tesseract.js entirely in the browser. Your images never touch a server. The workflow is:

  1. Drop a screenshot or photo
  2. OCR runs on-device with confidence scoring
  3. Optional AI reads the actual pixels and restores garbled text
  4. Export real searchable PDF with selectable text and embedded fonts

Tech Stack

  • Tesseract.js — client-side OCR with multi-language support
  • pdf-lib — generates real PDFs with text layers and embedded fonts
  • sql.js — WASM SQLite for building Anki .apkg files in-browser
  • Vanilla JS — no framework, no build step

Live: https://snap-pdf.onrender.com

What do you think? I'd love feedback on the architecture.

Top comments (0)