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/convert | Donutnaver/donut | |
|---|---|---|
| Type | OCR API | Open source |
| Price | 7 credits / page | 1 credit / page |
| Per 1,000 pages | $7.00 | $1.00 |
| Typical speed | 1.5 s / page | 1.0 s / page |
| Best for | Math and scientific papers | Receipt and form fields after fine-tuning |
| Inputs | PDF, images | images |
| Languages | 30+ languages | English, Chinese, Japanese, Korean |
| Max pages per request | 500 | 100 |
| Tables | ✓ Yes | No |
| Handwriting | ✓ Yes | No |
| Math | ✓ Yes | 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 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 Convert | Donut | |
|---|---|---|
| How you run it | Hosted API | Self-hosted; available in Hugging Face Transformers |
| Licence | Proprietary | MIT |
| Price | PDF $0.005 per page (0-1M), $0.0035 per page above 1M; images $0.002 each; one-time $19.99 API key activation fee | Free; you pay for compute |
| Output formats | LaTeX, Markdown, DOCX, HTML, JSON | JSON, plain text |
| Ready to use | Works on STEM documents without training | Base checkpoint is pretrain-only and must be fine-tuned before use |
| Best document types | Math-heavy papers, textbooks, handwritten equations | Receipt and form field extraction, document classification, narrow fixed-layout documents |
| Known failure | Images with more than 12 text rows may be billed at the PDF page rate | Misses 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 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.
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