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/marker | TrOCRmicrosoft/trocr | |
|---|---|---|
| Type | OCR API | Open source |
| Price | 14 credits / page | 1 credit / page |
| Per 1,000 pages | $14.00 | $1.00 |
| Typical speed | 2.5 s / page | 1.2 s / page |
| Best for | Books and research papers | Handwritten text lines |
| Inputs | PDF, images, DOCX | images |
| Languages | 90+ languages | English |
| Max pages per request | 1,000 | 100 |
| Tables | ✓ Yes | No |
| Handwriting | No | ✓ Yes |
| Math | ✓ Yes | No |
| Bounding boxes | ✓ Yes | No |
| Confidence | No | No |
| Forms | No | No |
| Multilingual | ✓ Yes | No |
| 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 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
| Marker | TrOCR | |
|---|---|---|
| Input scope | Whole PDFs and documents, including books and papers with equations | Single text-line images only; you need a separate line detector |
| Output formats | Markdown, HTML, JSON, chunks, LaTeX, images | Plain text |
| Licence | Code Apache-2.0; weights under a modified AI Pubs Open Rail-M licence, free for research, personal use and startups under $5M | MIT |
| How you run it | Self-hosted on GPU, CPU or MPS, or Datalab's hosted API | Library only, run locally through Hugging Face transformers |
| Price | Free self-hosted within the weight licence; hosted API has about 5,000 free pages per month | Free self-hosted; you pay for compute |
| Benchmark | 83.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 limits | Weights block free commercial use for companies above $5M without a paid licence | English-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 detailsTrOCR
Transformer text recognition model. Reads single text lines, including handwriting.
TrOCR 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/marker","fallbacks": ["microsoft/trocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Marker alternativesTrOCR alternativesBest OCR models in 2026