OCRRouter

TrOCR vs GOT-OCR 2.0

Pick TrOCR when you already have cropped single text-line images, especially English handwriting or receipt lines, or when you want to fine-tune a recognizer on your own line data. Pick GOT-OCR 2.0 when you need more than a line of text: formulas, tables, charts, sheet music or chemical structures, or English and Chinese documents. The main split is scope: TrOCR reads one line at a time and needs a separate line detector, while GOT-OCR 2.0 reads wider content and can output Markdown or LaTeX.

TrOCRmicrosoft/trocrGOT-OCR 2.0stepfun/got-ocr-2
TypeOpen sourceOpen source
Price1 credit / page1 credit / page
Per 1,000 pages$1.00$1.00
Typical speed1.2 s / page1.5 s / page
Best forHandwritten text linesFormatted text, formulas and charts
Inputsimagesimages
LanguagesEnglishChinese, English
Max pages per request100100
TablesNo✓ Yes
Handwriting✓ YesNo
MathNo✓ Yes
Bounding boxesNo✓ Yes
ConfidenceNoNo
FormsNoNo
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 reports 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 loads in a few lines with Hugging Face transformers.
  • The MIT license has no data restriction, and the English line recognizer is a good base for fine-tuning on custom line images.

Choose GOT-OCR 2.0 if

  • It reads text, formulas, tables, charts, sheet music and geometry in one 580M-parameter model, and outputs Markdown, LaTeX, TikZ, SMILES and kern.
  • Region OCR can be guided by box coordinates or color, and it supports dynamic resolution and multi-page OCR.
  • It is available in Hugging Face Transformers with batched inference, and suits English and Chinese documents.

Key differences

TrOCRGOT-OCR 2.0
Input scopeSingle text-line images only; you need a separate line detectorDocuments with text, formulas, tables, charts and sheet music; multi-page OCR
Output formatsPlain textPlain text, Markdown, LaTeX, TikZ, SMILES, kern
LicenceMIT (microsoft/unilm repository)Code Apache-2.0; training data CC BY-NC 4.0
Model sizeBase 334M, large 558M parameters580M parameters
Benchmark2.89 CER on IAM handwriting (TrOCR-large, from the authors)Not published
LanguagesEnglish-focused checkpoints; other languages need fine-tuningEnglish and Chinese documents
Known failureSlow versus CRNN recognizers on CPU; no layout or table outputOutput can loop characters midway (issue #226), return wrong text on blank images (issue #235), and format mode scores worse than plain mode (issue #317)

Sources

What each one is

TrOCR

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

TrOCR details

GOT-OCR 2.0

Unified OCR model that reads plain text, tables, formulas, sheet music and charts.

GOT-OCR 2.0 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": ["stepfun/got-ocr-2"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

TrOCR alternativesGOT-OCR 2.0 alternativesBest OCR models in 2026