OCRRouter

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/doclingDonutnaver/donut
TypeOpen sourceOpen source
Price2 credits / page1 credit / page
Per 1,000 pages$2.00$1.00
Typical speed2.2 s / page1.0 s / page
Best forStructured export for RAGReceipt and form fields after fine-tuning
InputsPDF, images, DOCXimages
LanguagesLatin scripts, CJKEnglish, Chinese, Japanese, Korean
Max pages per request500100
Tables✓ YesNo
HandwritingNoNo
Math✓ YesNo
Bounding boxes✓ YesNo
ConfidenceNoNo
FormsNo✓ Yes
MultilingualNoNo
On OCRRouterAvailableAvailable

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

DoclingDonut
What it isPython library from IBM Research that converts documents into a structured DoclingDocumentOCR-free Swin encoder plus BART decoder transformer from NAVER Clova, ECCV 2022
Ready to useYes, with pluggable OCR engines (EasyOCR, Tesseract, RapidOCR) and VLMs such as the 258M GraniteDoclingNo. The base checkpoint is pretrain-only and must be fine-tuned first
Output formatsMarkdown, HTML, JSON, DocTags, plain textJSON, plain text
Input typesPDF, Office files, HTML, EPUB, images, emails, XBRLDocument images
Licence and priceMIT (individual models have their own licences); free, self-hostedMIT; free, self-hosted
Known failureVersion 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 caveatScanned-page accuracy depends on the OCR engine you plug inTransformers v5 dropped image-to-text pipeline support, so load the model directly or stay on v4

Sources

What each one is

Docling

IBM's open-source document converter with a structured document model.

Docling details

Donut

OCR-free document understanding model. Fine-tuned for receipts, forms and document Q&A.

Donut details

Try 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 alternativesDonut alternativesBest OCR models in 2026