An OCR Engine Comparison platform that extracts text from images in the browser in real time.
- Tesseract.js — Runs entirely on-device (privacy-friendly, no server needed)
- OCR.space — Cloud-based, uses included API key
- Google Vision — Enterprise-grade, requires your own API key
https://vermashaurya.github.io/ocr-lens/
- Image upload via file picker
- Mobile camera capture (rear camera opens directly)
- Live camera with "take photo" flow
- Three OCR engine options to compare
- Confidence score display
| Engine | Type | Privacy | Accuracy | Setup |
|---|---|---|---|---|
| Tesseract.js | On-Device | ✅ 100% private | Moderate | None |
| OCR.space | Cloud | ❌ Sends to server | Good | Included key |
| Google Vision | Cloud | ❌ Sends to server | Excellent | Requires API key |
Because camera access is usually restricted on plain file:// pages, serve the folder through a local web server.
python3 -m http.server 8000Then open http://localhost:8000.
This app is static. You can deploy the folder directly to services such as Netlify, Vercel, GitHub Pages, or any web server.
- OCR.space: Pre-configured with a shared API key (rate limited)
- Google Vision: Enter your own API key in the input field. Get one free at console.cloud.google.com (1,000 requests/month free, requires billing enabled)
- OCR accuracy improves with sharp, high-contrast images
- The app uses English recognition (
eng) - Tesseract.js is loaded from CDN, so the site needs internet access
- Tesseract.js — Client-side OCR (CDN)
- OCR.space API — Cloud OCR
- Google Vision API — Cloud OCR
- HTML5 — Semantic markup
- CSS3 — Custom properties, grid layout, responsive design
- JavaScript — Vanilla JS, no frameworks
This project is licensed under the Apache License 2.0.
Copyright © 2026
Feel free to take inspiration.
Happy Coding!
