OCRRouter

Marker vs TrOCR

Pick Marker when you need to turn whole PDFs such as books and papers with equations into Markdown, HTML or JSON, or to build RAG chunks. Pick TrOCR when you already have cropped single text-line images, mainly English handwriting or receipt lines, and want a recognizer to fine-tune. The main split is scope: Marker handles pages and layout, TrOCR reads one line at a time and needs a separate line detector.

Markerdatalab/markerTrOCRmicrosoft/trocr
TypeOCR APIOpen source
Price14 credits / page1 credit / page
Per 1,000 pages$14.00$1.00
Typical speed2.5 s / page1.2 s / page
Best forBooks and research papersHandwritten text lines
InputsPDF, images, DOCXimages
Languages90+ languagesEnglish
Max pages per request1,000100
Tables✓ YesNo
HandwritingNo✓ Yes
Math✓ YesNo
Bounding boxes✓ YesNo
ConfidenceNoNo
FormsNoNo
Multilingual✓ YesNo
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 Marker if

  • You need full PDF to Markdown conversion, with HTML, JSON block trees, LaTeX and RAG chunks as other outputs.
  • You want to run on CPU, Apple Silicon or GPU, with a fast mode on CPU that runs at 23.6 pages per second.
  • You want a hosted option: Datalab's API includes about 5,000 free pages per month.

Choose TrOCR if

  • You are reading 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 checkpoints for handwritten (IAM), printed (SROIE) or scene text.
  • You need a plain MIT licence with no revenue cap, loaded in a few lines with Hugging Face transformers.

Key differences

MarkerTrOCR
Input scopeWhole PDFs and documents, including books and papers with equationsSingle text-line images only; you need a separate line detector
Output formatsMarkdown, HTML, JSON, chunks, LaTeX, imagesPlain text
LicenceCode Apache-2.0; weights under a modified AI Pubs Open Rail-M licence, free for research, personal use and startups under $5MMIT
How you run itSelf-hosted on GPU, CPU or MPS, or Datalab's hosted APILibrary only, run locally through Hugging Face transformers
PriceFree self-hosted within the weight licence; hosted API has about 5,000 free pages per monthFree self-hosted; you pay for compute
Benchmark83.7 on olmOCR-bench in vllm mode, 66.6 in CPU fast mode (Datalab's own numbers)2.89 CER on IAM handwriting with TrOCR-large (from the paper)
Known limitsWeights block free commercial use for companies above $5M without a paid licenceEnglish-focused checkpoints; other languages need fine-tuning; up to 558M parameters for one line, slow on CPU

Sources

What each one is

Marker

Hosted version of the open-source Marker and Surya models. Strong on books and papers.

Marker details

TrOCR

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

TrOCR 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": "datalab/marker","fallbacks": ["microsoft/trocr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Marker alternativesTrOCR alternativesBest OCR models in 2026