docTR vs Donut
Pick docTR if you need word-level OCR with coordinates today, for example on invoices and receipts that feed your own extraction code. Pick Donut if your documents have a narrow, fixed layout and you can fine-tune a model to turn images straight into structured JSON. The main split is that docTR reads text out of the box, while Donut's base checkpoint must be fine-tuned before it does anything useful.
docTRmindee/doctr | Donutnaver/donut | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 1 credit / page |
| Per 1,000 pages | $1.00 | $1.00 |
| Typical speed | 0.9 s / page | 1.0 s / page |
| Best for | Word-level OCR with positions | Receipt and form fields after fine-tuning |
| Inputs | PDF, images | images |
| Languages | Mainly Latin scripts | English, Chinese, Japanese, Korean |
| Max pages per request | 500 | 100 |
| Tables | No | No |
| Handwriting | No | No |
| Math | No | No |
| Bounding boxes | ✓ Yes | No |
| Confidence | ✓ Yes | 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 docTR if
- It returns a nested page, block, line and word structure with coordinates as JSON, so you can build your own extraction on top.
- It works without training, and you can choose between detection and recognition architectures, with straight or rotated boxes.
- It ships ready Docker images and a Hugging Face Spaces demo, and its Apache-2.0 licence comes with a key information extraction predictor.
Choose Donut if
- It skips the separate OCR step and maps a document image straight to structured output such as JSON.
- It suits receipt and form field extraction and document classification on fixed-layout document types, once fine-tuned.
- One Hacker News practitioner reports that about 200 documents of fine-tuning can reach human-level accuracy on narrow data.
Key differences
| docTR | Donut | |
|---|---|---|
| Approach | Two-stage text detection and recognition | OCR-free Swin encoder plus BART decoder, image to structured output |
| Out-of-the-box use | Runs as is, returns words and lines | Base checkpoint is pretrain-only and must be fine-tuned first |
| Licence | Apache-2.0 | MIT |
| Output | JSON, plain text, bounding boxes | JSON, plain text |
| Hardware and setup | CPU or NVIDIA GPU; GPU Docker images need CUDA 12.2 or newer on the host | Self-hosted; available in Hugging Face Transformers, but v5 dropped image-to-text pipeline support, so load the model directly or use v4 |
| Known failure | Cropped images give poorer results (issue #2007); split-crop merging can misjoin readings across repeated characters (issue #2229) | Misses tiny text in large images because of input resolution limits; one user found results on personal documents did not match the promised scores |
| Benchmarks | Not published | Not published |
Sources
What each one is
docTR
Open-source OCR library from Mindee with separate text detection and recognition models.
docTR detailsDonut
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": "mindee/doctr","fallbacks": ["naver/donut"],"file_url": "https://example.com/document.pdf"}