OCRRouter

TrOCR vs Donut

Pick TrOCR when you already have cropped single text lines and want an English recognizer, especially for handwriting. Pick Donut when you need structured JSON from whole documents such as receipts or forms and can fine-tune on your own layout. The main split is scope: TrOCR reads one line of text, Donut maps a document image to fields.

TrOCRmicrosoft/trocrDonutnaver/donut
TypeOpen sourceOpen source
Price1 credit / page1 credit / page
Per 1,000 pages$1.00$1.00
Typical speed1.2 s / page1.0 s / page
Best forHandwritten text linesReceipt and form fields after fine-tuning
Inputsimagesimages
LanguagesEnglishEnglish, Chinese, Japanese, Korean
Max pages per request100100
TablesNoNo
Handwriting✓ YesNo
MathNoNo
Bounding boxesNoNo
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 TrOCR if

  • It has separate checkpoints fine-tuned for handwritten (IAM), printed (SROIE) and scene text, so you can match the checkpoint to your input.
  • The paper reports 2.89 character error rate on the IAM handwriting set with the large model.
  • It loads in a few lines with Hugging Face transformers, which makes it a simple recognizer to drop into a pipeline you already have.

Choose Donut if

  • It needs no external OCR step: it maps document images straight to JSON, so you do not need a line detector.
  • It suits receipt and form field extraction, document classification and narrow, fixed-layout document types after fine-tuning.
  • A practitioner on Hacker News reports that about 200 fine-tuning documents can reach human-level accuracy on narrow data.

Key differences

TrOCRDonut
Input scopeSingle text-line images only. You need a separate line detector.Whole document images, no external OCR step.
OutputPlain textJSON or plain text
Out-of-the-box useCheckpoints are fine-tuned for handwritten, printed (SROIE) and scene text.The base checkpoint is pretrain-only and must be fine-tuned before use.
Benchmark2.89 CER on IAM handwriting (TrOCR-large), per the paper.Not published
Model sizeBase 334M, large 558M parameters.Not published
LanguagesReleased checkpoints are English-focused. Other languages need fine-tuning.Not published
Known failureNo layout, table or page-level output. Slow versus CRNN recognizers on CPU.Misses tiny text in large images due to input resolution limits. Transformers v5 dropped image-to-text pipeline support, so load it directly or use v4.
Licence and costMIT, free and self-hosted (you pay for compute).MIT, free and self-hosted (you pay for compute).

Sources

What each one is

TrOCR

Transformer text recognition model. Reads single text lines, including handwriting.

TrOCR 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": "microsoft/trocr","fallbacks": ["naver/donut"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

TrOCR alternativesDonut alternativesBest OCR models in 2026