OCRRouter

Chandra vs Tesseract.js

Pick Chandra for scanned PDFs, tables, forms and math that must become Markdown, HTML or JSON, and for multilingual work. Pick Tesseract.js for in-browser OCR of clean printed text where images must not leave the user's device. The main split is output and runtime: Chandra needs a GPU or a paid API and returns structured layout, while Tesseract.js is a free library that returns plain text.

Chandradatalab/chandraTesseract.jstesseract/tesseract-js
TypeOpen sourceOpen source
Price2 credits / page1 credit / page
Per 1,000 pages$2.00$1.00
Typical speed2.0 s / page2.0 s / page
Best forComplex layouts and handwritingOCR in the browser
InputsPDF, imagesimages
Languages40+ languages100+ languages
Max pages per request500500
Tables✓ YesNo
Handwriting✓ YesNo
Math✓ YesNo
Bounding boxes✓ Yes✓ Yes
ConfidenceNo✓ Yes
Forms✓ YesNo
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 Chandra if

  • It outputs Markdown, HTML and JSON plus layout chunks with bounding boxes and labels per block, which suits PDF to Markdown for RAG.
  • It scores 85.8 on olmOCR-bench (Chandra 2) and averages 77.8% across 43 languages in the authors' benchmarks.
  • You can self-host the open weights on one NVIDIA GPU via vLLM, or use the hosted Datalab API at $1, $3 or $7.50 per 1,000 pages.

Choose Tesseract.js if

  • It runs fully client side in the browser or in Node.js, so images never leave the user's device.
  • It is free under Apache-2.0 and installs from npm, ESM or a CDN script tag, with no GPU or API bill.
  • It supports more than 100 languages through Tesseract traineddata files, which covers simple printed text in common languages.

Key differences

ChandraTesseract.js
LicenceCode Apache-2.0; weights modified OpenRAIL-M, free for research, personal use and companies under $2M funding or revenueApache-2.0
How you run itSelf-host on one NVIDIA GPU with vLLM or Hugging Face, or call the hosted Datalab APIJavaScript and WebAssembly library in the browser or Node.js
PriceSelf-hosted: free within licence terms, you pay for compute. Datalab API: $1, $3 or $7.50 per 1,000 pages; free tier of $20/monthFree, runs on the user's device or your server
Output formatsMarkdown, HTML, JSON, bounding boxesPlain text, hOCR, bounding boxes
Input and layoutDocuments with tables, forms and mathDoes not accept PDF files; not suited to tables, layout or Markdown output
BenchmarkolmOCR-bench overall 85.8 (Chandra 2, authors' figure)Not published
Known failureToken-loop hallucinations on 5-6 of about 60 Russian and Kazakh scans in GitHub issue #51; weak on Urdu (43.2%) and old scansLower accuracy than the native Tesseract CLI on the same image; fails on screen resolution text unless upscaled

Sources

What each one is

Chandra

Datalab's OCR model that keeps layout and handles forms, tables and handwriting.

Chandra 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": "datalab/chandra","fallbacks": ["tesseract/tesseract-js"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Chandra alternativesTesseract.js alternativesBest OCR models in 2026