OCRRouter

TrOCR vs Chandra

Pick Chandra for full pages and PDFs, tables, forms and non-English text. Pick TrOCR only when you already have cropped single text-line images, such as English handwriting or receipt lines, or want to fine-tune a recognizer. The main split is scope: TrOCR reads one line and needs your own line detector, while Chandra reads whole pages and returns layout.

TrOCRmicrosoft/trocrChandradatalab/chandra
TypeOpen sourceOpen source
Price1 credit / page2 credits / page
Per 1,000 pages$1.00$2.00
Typical speed1.2 s / page2.0 s / page
Best forHandwritten text linesComplex layouts and handwriting
InputsimagesPDF, images
LanguagesEnglish40+ languages
Max pages per request100500
TablesNo✓ Yes
Handwriting✓ Yes✓ Yes
MathNo✓ Yes
Bounding boxesNo✓ Yes
ConfidenceNoNo
FormsNo✓ Yes
MultilingualNo✓ 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 TrOCR if

  • You have English handwritten lines and want a model that reports 2.89 character error rate on IAM with the large checkpoint.
  • You want to fine-tune a recognizer on your own line images, starting from separate handwritten (IAM), printed (SROIE) and scene text checkpoints.
  • You want plain MIT licensing with no revenue or funding threshold, and a few lines of Hugging Face transformers code.

Choose Chandra if

  • You need to convert full pages or PDFs to Markdown, HTML or JSON with bounding boxes, for example for RAG pipelines.
  • Your documents have tables, forms or math, or are in many languages: Chandra 2 averages 77.8% across 43 languages.
  • You want a hosted option: the Datalab API costs $1, $3 or $7.50 per 1,000 pages depending on mode, with $20/month of free usage.

Key differences

TrOCRChandra
Input scopeSingle text-line images only; needs a separate line detectorFull pages with layout, tables, forms and math
OutputPlain textMarkdown, HTML, JSON and bounding boxes
LicenceMITCode Apache-2.0; weights modified OpenRAIL-M, free for research, personal use and companies under $2M funding/revenue
How you run itLocal library via Hugging Face transformers; base 334M or large 558M parametersSelf-host with vLLM or Hugging Face on a GPU (A100, L40S, RTX 4090/5090 presets), or use the hosted Datalab API
PriceFree, self-hosted; you pay for computeSelf-hosted free within licence terms; API $1, $3 or $7.50 per 1,000 pages
LanguagesEnglish-focused checkpoints; other languages need fine-tuning77.8% average over 43 languages; weak on Urdu (43.2%) and Sanskrit (51.1%)
Known failureSlow for a single line on CPU versus CRNN recognizersToken-loop hallucinations reported on some Russian/Kazakh scans; only 51.1 on old scans in olmOCR-bench

Sources

What each one is

TrOCR

Transformer text recognition model. Reads single text lines, including handwriting.

TrOCR details

Chandra

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

Chandra 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 20 MB each, 10 files.No file?

Use one, fall back to the other

{"model": "microsoft/trocr","fallbacks": ["datalab/chandra"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

TrOCR alternativesChandra alternativesBest OCR models in 2026