OCRRouter

TrOCR vs Nanonets-OCR

Pick TrOCR if you need to read single lines of English handwriting or fine-tune a recognizer on your own line images. Pick Nanonets-OCR if you need whole printed business documents turned into Markdown, with signatures, checkboxes and flowcharts tagged. The main split is scope: TrOCR reads one text line at a time and needs a separate line detector, while Nanonets-OCR reads full pages but is weak on handwriting.

TrOCRmicrosoft/trocrNanonets-OCRnanonets/nanonets-ocr
TypeOpen sourceOpen source
Price1 credit / page2 credits / page
Per 1,000 pages$1.00$2.00
Typical speed1.2 s / page1.8 s / page
Best forHandwritten text linesMarkdown with semantic tags
InputsimagesPDF, images
LanguagesEnglishMultilingual
Max pages per request100500
TablesNo✓ Yes
Handwriting✓ YesNo
MathNo✓ Yes
Bounding boxesNoNo
ConfidenceNoNo
FormsNo✓ Yes
MultilingualNo✓ Yes
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 reports a 2.89 character error rate on the IAM handwriting set with the large model, per the paper.
  • It ships separate checkpoints fine-tuned for handwritten (IAM), printed (SROIE) and scene text, and it is a good base for fine-tuning on custom line images.
  • It uses the MIT licence and loads in a few lines with Hugging Face transformers.

Choose Nanonets-OCR if

  • It converts printed PDFs and business documents to Markdown, and can output HTML, LaTeX and Mermaid as well.
  • It tags signatures, watermarks and image descriptions, converts checkboxes to unicode symbols, and extracts flowcharts and org charts as Mermaid code.
  • It scores 89.43 on DocVQA for the 3B model, per the model card.

Key differences

TrOCRNanonets-OCR
Input scopeSingle text-line images only, so you need a separate line detectorFull document pages converted to Markdown
Output formatsPlain textMarkdown, HTML, LaTeX and Mermaid
Handwriting2.89 CER on IAM with the large model; English handwritten lines are a stated good fitNot trained on handwriting and can hallucinate; one test saw generation loops with CER up to 2100% and 69.1s per image on an L4
LicenceMIT (microsoft/unilm repository)Not stated on the Nanonets-OCR2-3B model card; base model is Qwen2.5-VL-3B
Model sizeBase 334M, large 558M parameters3B (Hugging Face lists about 4B)
LanguagesReleased checkpoints are English-focused; other languages need fine-tuningNot published
Prompting and known failureNo layout, table or page-level outputTrained on a fixed prompt; the team says hallucination with other prompts is expected. olmOCR-bench overall is 69.5

Sources

What each one is

TrOCR

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

TrOCR details

Nanonets-OCR

Open image-to-Markdown model that tags tables, equations, signatures, watermarks and checkboxes.

Nanonets-OCR 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": ["nanonets/nanonets-ocr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

TrOCR alternativesNanonets-OCR alternativesBest OCR models in 2026