Docling vs Donut
Pick Docling to ingest born-digital PDFs, Office files and HTML into Markdown or lossless JSON for RAG. Pick Donut only for a narrow, fixed-layout document type such as receipts or forms, and only if you can fine-tune it. Docling works on whole documents out of the box; Donut is an untrained base model that maps page images to JSON fields.
Doclingibm/docling | Donutnaver/donut | |
|---|---|---|
| Type | Open source | Open source |
| Price | 2 credits / page | 1 credit / page |
| Per 1,000 pages | $2.00 | $1.00 |
| Typical speed | 2.2 s / page | 1.0 s / page |
| Best for | Structured export for RAG | Receipt and form fields after fine-tuning |
| Inputs | PDF, images, DOCX | images |
| Languages | Latin scripts, CJK | English, Chinese, Japanese, Korean |
| Max pages per request | 500 | 100 |
| Tables | ✓ Yes | No |
| Handwriting | No | No |
| Math | ✓ Yes | No |
| Bounding boxes | ✓ Yes | No |
| Confidence | No | No |
| Forms | No | ✓ Yes |
| Multilingual | No | 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 Docling if
- You need one API for PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, emails and XBRL.
- You want Markdown, HTML, JSON, DocTags or plain text, with lossless JSON that keeps layout, reading order and table structure.
- You are feeding LangChain or LlamaIndex pipelines and want an MIT-licensed library that runs on CPU, with a GPU to speed up model stages.
Choose Donut if
- You are extracting fields from receipts or forms with a fixed layout and can fine-tune on your own labelled samples.
- You want no external OCR step: the model maps the document image straight to structured JSON.
- You need document classification on a narrow set of document types under an MIT licence, loaded through Hugging Face Transformers.
Key differences
| Docling | Donut | |
|---|---|---|
| What it is | Python library from IBM Research that converts documents into a structured DoclingDocument | OCR-free Swin encoder plus BART decoder transformer from NAVER Clova, ECCV 2022 |
| Ready to use | Yes, with pluggable OCR engines (EasyOCR, Tesseract, RapidOCR) and VLMs such as the 258M GraniteDocling | No. The base checkpoint is pretrain-only and must be fine-tuned first |
| Output formats | Markdown, HTML, JSON, DocTags, plain text | JSON, plain text |
| Input types | PDF, Office files, HTML, EPUB, images, emails, XBRL | Document images |
| Licence and price | MIT (individual models have their own licences); free, self-hosted | MIT; free, self-hosted |
| Known failure | Version 2.143.1 drops words and numbers with full-page Tesseract OCR (issue #5254); reading order can merge neighbouring columns (issue #5132) | Misses tiny text in large images because of input resolution limits; one HN user found results on personal documents did not match the promised scores |
| Setup caveat | Scanned-page accuracy depends on the OCR engine you plug in | Transformers v5 dropped image-to-text pipeline support, so load the model directly or stay on v4 |
Sources
- Docling GitHub README
- Supported formats
- Issue #5254 OCR regression
- donut-base model card
- Donut ECCV paper
- Hacker News thread
What each one is
Donut
OCR-free document understanding model. Fine-tuned for receipts, forms and document Q&A.
Donut detailsTry 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": "ibm/docling","fallbacks": ["naver/donut"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Docling vs GOT-OCR 2.0Docling vs NougatTesseract vs DonutMinerU vs DonutLlamaParse vs DoclingPaddleOCR-VL vs DoclingMinerU vs DoclingDocling vs Tesseract
Docling alternativesDonut alternativesBest OCR models in 2026