OCRRouter

Amazon Textract vs TrOCR

Pick Amazon Textract for English forms, invoices and large scanned PDF batches on AWS, where you need tables, forms and page-level JSON from one API call. Pick TrOCR when you already have cropped single text-line images, mostly English handwriting or receipts, and want an MIT-licensed model you can run and fine-tune yourself. The main split is scope: Textract reads whole documents, TrOCR reads one line at a time.

Amazon Textractaws/textractTrOCRmicrosoft/trocr
TypeOCR APIOpen source
Price25 credits / page1 credit / page
Per 1,000 pages$25.00$1.00
Typical speed1.2 s / page1.2 s / page
Best forForms and key-value extractionHandwritten text lines
InputsPDF, imagesimages
Languages6 languagesEnglish
Max pages per request3,000100
Tables✓ YesNo
Handwriting✓ Yes✓ Yes
MathNoNo
Bounding boxes✓ YesNo
Confidence✓ YesNo
Forms✓ YesNo
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 Amazon Textract if

  • It reads full pages and PDFs, and the async API handles files up to 500 MB and 3,000 pages.
  • It extracts tables, forms and queries, and scores 80.9% on RD-TableBench table accuracy in an independent test.
  • It returns word and line geometry with confidence scores as JSON, plain text and bounding boxes.

Choose TrOCR if

  • It reports a 2.89 character error rate on the IAM handwriting set with the large model, per the paper.
  • It is MIT licensed and free to self-host, and you only pay for compute.
  • It ships separate checkpoints for handwritten (IAM), printed (SROIE) and scene text, and you can fine-tune it on your own line images.

Key differences

Amazon TextractTrOCR
Input scopeFull pages and PDFs; sync API takes one page, async API takes up to 3,000 pagesSingle text-line images only; you need a separate line detector
How you run itHosted API on AWSLibrary you run locally through Hugging Face transformers
LicenceProprietaryMIT (microsoft/unilm repository)
PriceUS West (Oregon), first 1M pages/month: text detection $0.0015/page, Tables $0.015/page, Forms $0.05/page, Queries $0.015/pageFree, self-hosted (you pay for compute)
OutputJSON, plain text, bounding boxes with confidence scoresPlain text only; no layout, table or page-level output
LanguagesText detection covers English, French, German, Italian, Portuguese and Spanish; handwriting and Queries are English onlyReleased checkpoints are English-focused; other languages need fine-tuning
Benchmark80.9% on RD-TableBench table accuracy (independent)2.89 CER on IAM handwriting with TrOCR-large (reported by the authors)

Sources

What each one is

Amazon Textract

AWS OCR with form key-value pairs, tables and per-word confidence scores.

Amazon Textract details

TrOCR

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

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

Questions

More comparisons

Amazon Textract alternativesTrOCR alternativesBest OCR models in 2026