Surya vs Nanonets-OCR
Pick Surya when you need layout, reading order and bounding boxes, or want OCR on a laptop or CPU with about 4-6 GB of RAM. Pick Nanonets-OCR when you want printed business PDFs turned into Markdown for an LLM, with signatures, checkboxes and flowcharts tagged. Surya scores 83.7% on olmOCR-bench with 689M parameters, while Nanonets-OCR2-3B scores 69.5.
Suryadatalab/surya | Nanonets-OCRnanonets/nanonets-ocr | |
|---|---|---|
| Type | Open source | Open source |
| Price | 2 credits / page | 2 credits / page |
| Per 1,000 pages | $2.00 | $2.00 |
| Typical speed | 1.5 s / page | 1.8 s / page |
| Best for | Layout and line-level OCR | Markdown with semantic tags |
| Inputs | PDF, images | PDF, images |
| Languages | 90+ languages | Multilingual |
| Max pages per request | 500 | 500 |
| Tables | ✓ Yes | ✓ Yes |
| Handwriting | No | No |
| Math | No | ✓ Yes |
| Bounding boxes | ✓ Yes | No |
| Confidence | No | No |
| Forms | No | ✓ Yes |
| 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 Surya if
- It scores 83.7% on olmOCR-bench with 689M parameters, against 69.5 for Nanonets-OCR2-3B.
- It returns layout labels, reading order, OCR, HTML tables and KaTeX math with per-block bounding boxes in one model.
- It runs on CPU and Apple Silicon through llama.cpp, and does 4.52 pages/s at 192 DPI on one H100 with vLLM.
Choose Nanonets-OCR if
- It tags signatures, watermarks and image descriptions, and converts checkboxes to unicode symbols.
- It extracts flowcharts and org charts as Mermaid code.
- It outputs Markdown directly and separates inline from display LaTeX equations, which suits feeding printed PDFs to an LLM.
Key differences
| Surya | Nanonets-OCR | |
|---|---|---|
| Licence | Code Apache-2.0; weights under modified AI Pubs Open Rail-M, free for research, personal use and companies under $5M funding or revenue | Not stated on the Nanonets-OCR2-3B model card; base model is Qwen2.5-VL-3B |
| How you run it | Self-host. A lightweight client talks to a vLLM or llama.cpp server that you run separately. | Self-host the weights from Hugging Face. |
| Model size | 689M parameters | 3B (Hugging Face lists about 4B) |
| Output formats | JSON, HTML, LaTeX, bounding boxes, plain text | Markdown, HTML, LaTeX, Mermaid |
| olmOCR-bench | 83.7% (Surya 2.5, reported by the authors) | 69.5 overall (OCR2-3B, reported by the authors) |
| Handwriting | The README says to send handwriting to the hosted Datalab API. | Not trained on handwriting. It can hallucinate, and one test saw generation loops with CER up to 2100% and 69.1s per image on an L4. |
| Known failure | Surya 2.5 table output lacks row and column geometry. Multilingual tables score 58.1, and only 21 of 91 languages reach a 90% pass rate. | Trained on a fixed prompt, so custom prompts are expected to hallucinate. It loses to Gemini 2.5 Flash in 52.43% of head-to-head Markdown comparisons. |
Sources
- Surya GitHub README
- Datalab pricing and license FAQ
- Nanonets-OCR2-3B model card
- Nanonets-OCR-s announcement
- HF discussion fixed prompt
What each one is
Surya
Open-source OCR toolkit with line detection, layout analysis, reading order and tables.
Surya 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": "datalab/surya","fallbacks": ["nanonets/nanonets-ocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Surya alternativesNanonets-OCR alternativesBest OCR models in 2026