OCRRouter

Mathpix Convert vs Donut

Pick Mathpix Convert when you need to turn math-heavy papers, textbooks or handwritten equations into LaTeX, Markdown or DOCX through a hosted API. Pick Donut when you have a narrow, fixed-layout document type such as receipts or forms and can fine-tune a self-hosted MIT-licensed model to extract fields as JSON. The main split is that Mathpix works on STEM pages out of the box, while Donut is a base model that needs training before use.

Mathpix Convertmathpix/convertDonutnaver/donut
TypeOCR APIOpen source
Price7 credits / page1 credit / page
Per 1,000 pages$7.00$1.00
Typical speed1.5 s / page1.0 s / page
Best forMath and scientific papersReceipt and form fields after fine-tuning
InputsPDF, imagesimages
Languages30+ languagesEnglish, Chinese, Japanese, Korean
Max pages per request500100
Tables✓ YesNo
Handwriting✓ YesNo
Math✓ YesNo
Bounding boxes✓ YesNo
Confidence✓ YesNo
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 Mathpix Convert if

  • You need LaTeX, Markdown, DOCX, HTML or JSON output from math, tables and chemistry, including whole PDFs.
  • You want a hosted API with per-page pricing: $0.005 per page for PDFs and $0.002 per image, with no model to train or host.
  • Your documents include handwritten equations or math-heavy textbooks and papers.

Choose Donut if

  • You want to extract fields from receipts or forms with a model fine-tuned on your own fixed-layout documents.
  • You need an MIT licence and self-hosting, with no per-page fee and only compute costs.
  • You want to skip a separate OCR step and map document images straight to structured JSON, or do document classification.

Key differences

Mathpix ConvertDonut
How you run itHosted APISelf-hosted; available in Hugging Face Transformers
LicenceProprietaryMIT
PricePDF $0.005 per page (0-1M), $0.0035 per page above 1M; images $0.002 each; one-time $19.99 API key activation feeFree; you pay for compute
Output formatsLaTeX, Markdown, DOCX, HTML, JSONJSON, plain text
Ready to useWorks on STEM documents without trainingBase checkpoint is pretrain-only and must be fine-tuned before use
Best document typesMath-heavy papers, textbooks, handwritten equationsReceipt and form field extraction, document classification, narrow fixed-layout documents
Known failureImages with more than 12 text rows may be billed at the PDF page rateMisses tiny text in large images because of input resolution limits

Sources

What each one is

Mathpix Convert

Specialist for math, science papers and handwritten formulas. Outputs LaTeX.

Mathpix Convert 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": "mathpix/convert","fallbacks": ["naver/donut"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Mathpix Convert alternativesDonut alternativesBest OCR models in 2026