Docling vs Nanonets-OCR
Pick Docling to ingest born-digital PDFs and Office files into a RAG pipeline, because it parses many formats under an MIT licence and exports lossless JSON with layout. Pick Nanonets-OCR to turn printed business documents into Markdown, especially ones with signatures, watermarks, checkboxes or flowcharts. Neither is a safe choice for handwriting or poor scans without testing: Docling depends on the OCR engine you plug in, and Nanonets-OCR was not trained on handwriting and can hallucinate.
Doclingibm/docling | 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 | 2.2 s / page | 1.8 s / page |
| Best for | Structured export for RAG | Markdown with semantic tags |
| Inputs | PDF, images, DOCX | PDF, images |
| Languages | Latin scripts, CJK | Multilingual |
| Max pages per request | 500 | 500 |
| Tables | ✓ Yes | ✓ Yes |
| Handwriting | No | No |
| Math | ✓ Yes | ✓ Yes |
| Bounding boxes | ✓ Yes | No |
| Confidence | No | 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 Docling if
- You need one API for PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, emails and XBRL.
- You want lossless JSON that keeps layout, reading order and table structure, with an MIT licence.
- You want to choose your own OCR backend (EasyOCR, Tesseract, RapidOCR) or the 258M GraniteDocling VLM, and run on CPU if needed.
Choose Nanonets-OCR if
- Your documents carry signatures, watermarks or checkboxes, which it tags or converts to unicode symbols.
- You need flowcharts and org charts turned into Mermaid code, or inline and display LaTeX told apart.
- You want printed PDFs as Markdown for an LLM from one 3B model, with a published DocVQA score of 89.43 on the model card.
Key differences
| Docling | Nanonets-OCR | |
|---|---|---|
| What it is | Python library from IBM Research that converts documents into a structured DoclingDocument | Family of image-to-Markdown models fine-tuned from Qwen2.5-VL-3B |
| Licence | MIT (individual models have their own licences) | Not stated on the Nanonets-OCR2-3B model card |
| Input formats | PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, emails, XBRL | Images of pages |
| Output formats | Markdown, HTML, JSON, DocTags, plain text | Markdown, HTML, LaTeX, Mermaid |
| Benchmarks | Not published | olmOCR-bench overall 69.5, DocVQA 89.43, ChartQA 78.56 (OCR2-3B, reported by the authors) |
| Handwriting and scans | Scan accuracy depends on the OCR engine you plug in | Not trained on handwriting; handwriting test saw generation loops with CER up to 2100% |
| Known failures | OCR regression in 2.143.1 drops words and numbers with full-page Tesseract; reading order can merge neighbouring columns | Trained on a fixed prompt, so other prompts are expected to hallucinate |
Sources
- Docling GitHub README
- Supported formats
- Issue #5254 OCR regression
- Issue #5132 reading order
- Nanonets-OCR2-3B model card
- HF discussion fixed prompt
What each one is
Nanonets-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": "ibm/docling","fallbacks": ["nanonets/nanonets-ocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Docling alternativesNanonets-OCR alternativesBest OCR models in 2026