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/chandra | Tesseract.jstesseract/tesseract-js | |
|---|---|---|
| Type | Open source | Open source |
| Price | 2 credits / page | 1 credit / page |
| Per 1,000 pages | $2.00 | $1.00 |
| Typical speed | 2.0 s / page | 2.0 s / page |
| Best for | Complex layouts and handwriting | OCR in the browser |
| Inputs | PDF, images | images |
| Languages | 40+ languages | 100+ languages |
| Max pages per request | 500 | 500 |
| Tables | ✓ Yes | No |
| Handwriting | ✓ Yes | No |
| Math | ✓ Yes | No |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | No | ✓ Yes |
| Forms | ✓ Yes | No |
| Multilingual | ✓ Yes | ✓ Yes |
| On OCRRouter | Available | Available |
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
| Chandra | Tesseract.js | |
|---|---|---|
| Licence | Code Apache-2.0; weights modified OpenRAIL-M, free for research, personal use and companies under $2M funding or revenue | Apache-2.0 |
| How you run it | Self-host on one NVIDIA GPU with vLLM or Hugging Face, or call the hosted Datalab API | JavaScript and WebAssembly library in the browser or Node.js |
| Price | Self-hosted: free within licence terms, you pay for compute. Datalab API: $1, $3 or $7.50 per 1,000 pages; free tier of $20/month | Free, runs on the user's device or your server |
| Output formats | Markdown, HTML, JSON, bounding boxes | Plain text, hOCR, bounding boxes |
| Input and layout | Documents with tables, forms and math | Does not accept PDF files; not suited to tables, layout or Markdown output |
| Benchmark | olmOCR-bench overall 85.8 (Chandra 2, authors' figure) | Not published |
| Known failure | Token-loop hallucinations on 5-6 of about 60 Russian and Kazakh scans in GitHub issue #51; weak on Urdu (43.2%) and old scans | Lower accuracy than the native Tesseract CLI on the same image; fails on screen resolution text unless upscaled |
Sources
- Chandra GitHub README
- Datalab pricing
- GitHub issue #51 token loops
- GitHub README
- Issue #251 accuracy vs CLI
What each one is
Chandra
Datalab's OCR model that keeps layout and handles forms, tables and handwriting.
Chandra detailsTesseract.js
Tesseract compiled to JavaScript and WebAssembly, so OCR runs in the browser or in Node.js.
Tesseract.js detailsTry both on your own file
Run the file once with each model and compare the output.
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