OCRRouter

OCRmyPDF vs Tesseract.js

Pick OCRmyPDF when the input is scanned PDFs and you need a searchable PDF/A out, for example archives or office scanner pipelines. Pick Tesseract.js when OCR must run in the browser or Node.js and images must stay on the user's device. Tesseract.js does not accept PDFs, so the input format often decides it.

OCRmyPDFocrmypdf/ocrmypdfTesseract.jstesseract/tesseract-js
TypeOpen sourceOpen source
Price1 credit / page1 credit / page
Per 1,000 pages$1.00$1.00
Typical speed1.0 s / page2.0 s / page
Best forSearchable PDFs from scansOCR in the browser
InputsPDF, imagesimages
Languages100+ languages (via Tesseract)100+ languages
Max pages per request1,000500
TablesNoNo
HandwritingNoNo
MathNoNo
Bounding boxesNo✓ Yes
ConfidenceNo✓ Yes
FormsNoNo
Multilingual✓ Yes✓ Yes
On OCRRouterAvailableAvailable

Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.

Which to choose

Choose OCRmyPDF if

  • You need validated searchable PDF/A output for archiving or compliance.
  • You process scanned PDFs on a server and want work spread across all CPU cores.
  • You want the OCR layer added without re-encoding the rest of the PDF where possible.

Choose Tesseract.js if

  • You need OCR inside a web page and images must never leave the user's device.
  • You want an npm, ESM or CDN script tag install under Apache-2.0.
  • You need hOCR or bounding boxes from clean screenshots or scans of simple printed text.

Key differences

OCRmyPDFTesseract.js
How you run itCommand-line tool that runs locallyJavaScript and WebAssembly library for the browser or Node.js
InputScanned PDFsImages only. It does not accept PDF files; the README points to Scribe.js for PDFs
Output formatsSearchable PDF/A, plain textPlain text, hOCR, bounding boxes
LicenceMPL-2.0Apache-2.0
Languages100+ through Tesseract language packs100+ through Tesseract traineddata files
Speed and hardwareCPU only, parallelised across all coresOne Electron user measured about 15 s per page versus 1.5 s with the Tesseract CLI
Known failure--skip-text with default PDF/A output removes form fields (issue #1790). Some PDFs with a shared Resources dictionary hang (issue #1763)Users report lower accuracy than the native Tesseract CLI (issue #251). Text at screen resolution fails unless images are upscaled first

Sources

What each one is

OCRmyPDF

Command-line tool that adds a searchable text layer to scanned PDFs, using Tesseract.

OCRmyPDF details

Tesseract.js

Tesseract compiled to JavaScript and WebAssembly, so OCR runs in the browser or in Node.js.

Tesseract.js details

Try both on your own file

Run the file once with each model and compare the output.

PDF, PNG, JPG, WebP, HEIC. Up to 10 files at onceNo file?

Use one, fall back to the other

{"model": "ocrmypdf/ocrmypdf","fallbacks": ["tesseract/tesseract-js"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

OCRmyPDF alternativesTesseract.js alternativesBest OCR models in 2026