docTR vs Nanonets-OCR
Pick docTR when you need word-level text with coordinates from invoices or receipts and want to feed your own extraction code, under an Apache-2.0 licence. Pick Nanonets-OCR when you need printed business PDFs turned into Markdown, with signatures, watermarks, checkboxes and flowcharts tagged. The main split is output: docTR returns words and lines only, Nanonets-OCR returns Markdown, HTML, LaTeX and Mermaid.
docTRmindee/doctr | Nanonets-OCRnanonets/nanonets-ocr | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 2 credits / page |
| Per 1,000 pages | $1.00 | $2.00 |
| Typical speed | 0.9 s / page | 1.8 s / page |
| Best for | Word-level OCR with positions | Markdown with semantic tags |
| Inputs | PDF, images | PDF, images |
| Languages | Mainly Latin scripts | Multilingual |
| Max pages per request | 500 | 500 |
| Tables | No | ✓ Yes |
| Handwriting | No | No |
| Math | No | ✓ Yes |
| Bounding boxes | ✓ Yes | No |
| Confidence | ✓ Yes | No |
| Forms | No | ✓ Yes |
| Multilingual | No | ✓ 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 docTR if
- You need a nested page, block, line and word structure with coordinates as JSON, or bounding boxes for downstream extraction.
- You want a clear Apache-2.0 licence, plus a choice of detection and recognition architectures and a key information extraction predictor.
- You run on CPU or an NVIDIA GPU and want ready Docker images (GPU images need CUDA 12.2 or newer on the host).
Choose Nanonets-OCR if
- You need printed PDFs converted to Markdown for LLMs, including tables, LaTeX equations and HTML output.
- Your documents carry signatures, watermarks, image descriptions or checkboxes, which the model tags or converts to unicode symbols.
- You need flowcharts and org charts extracted as Mermaid code.
Key differences
| docTR | Nanonets-OCR | |
|---|---|---|
| Licence | Apache-2.0 | Not stated on the Nanonets-OCR2-3B model card (no licence tag); the base model is Qwen2.5-VL-3B |
| How you run it | Python library on PyTorch, with Docker images; CPU or NVIDIA GPU | Self-host the weights from Hugging Face; fine-tuned from Qwen2.5-VL-3B (3B, about 4B params listed on Hugging Face) |
| Price | Free, self-hosted (you pay for compute) | Free, self-hosted (you pay for compute) |
| Output formats | JSON, plain text, bounding boxes | Markdown, HTML, LaTeX, Mermaid |
| Tables and formulas | No table, formula or Markdown output; words and lines only | Distinguishes inline and display LaTeX equations; Markdown and HTML output |
| Benchmarks | Not published | OCR2-3B: olmOCR-bench overall 69.5, DocVQA 89.43, ChartQA 78.56 (reported by the authors) |
| Known failure | Cropping images leads to poorer results (issue #2007); split-crop merging misjoins readings across repeated characters (issue #2229) | Not trained on handwriting and can hallucinate; one handwriting test saw generation loops with CER up to 2100% and 69.1s per image on an L4; trained on a fixed prompt, so other prompts are expected to hallucinate |
Sources
- docTR GitHub README
- Issue #2007
- Issue #2229
- Nanonets-OCR2-3B model card
- Nanonets-OCR-s announcement
- HF discussion fixed prompt
What each one is
docTR
Open-source OCR library from Mindee with separate text detection and recognition models.
docTR detailsNanonets-OCR
Open image-to-Markdown model that tags tables, equations, signatures, watermarks and checkboxes.
Nanonets-OCR 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": "mindee/doctr","fallbacks": ["nanonets/nanonets-ocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
docTR alternativesNanonets-OCR alternativesBest OCR models in 2026