OCRRouter

TrOCR vs Unstructured

Pick TrOCR if you already have cropped single text-line images, especially English handwriting or receipt lines, and want an MIT-licensed recognizer you can fine-tune. Pick Unstructured if you need to ingest whole files such as PDFs, Word, PowerPoint, emails and HTML into typed elements for RAG. TrOCR reads only one text line at a time, while Unstructured works at the document level.

TrOCRmicrosoft/trocrUnstructuredunstructured/unstructured
TypeOpen sourceOCR API
Price1 credit / page20 credits / page
Per 1,000 pages$1.00$20.00
Typical speed1.2 s / page3.0 s / page
Best forHandwritten text linesMixed file types into RAG
InputsimagesPDF, images, DOCX
LanguagesEnglishMultilingual
Max pages per request1001,000
TablesNo✓ Yes
Handwriting✓ YesNo
MathNoNo
Bounding boxesNo✓ Yes
ConfidenceNoNo
FormsNoNo
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 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 you can fine-tune it on your own line images.
  • It is MIT-licensed, free to self-host, and loads in a few lines with Hugging Face transformers.

Choose Unstructured if

  • It takes PDFs, HTML, Word, PowerPoint, emails and images in one library and returns JSON, HTML, plain text and bounding boxes.
  • The hosted platform gives you the first 10,000 pages free, then $0.015 per page, so you can start without running anything yourself.
  • Its Auto, Fast, High-Res and VLM strategies let you trade speed for quality, and the Fast strategy suits born-digital PDFs.

Key differences

TrOCRUnstructured
Input it readsSingle text-line images only; you need a separate line detectorWhole files: PDFs, HTML, Word, PowerPoint, emails and images
OutputPlain text only; no layout, table or page-level outputJSON, HTML, plain text and bounding boxes, split into typed elements
How you run itLibrary only, run locally through Hugging Face transformersSelf-host the open-source library or use the hosted API
LicenceMIT (microsoft/unilm repository)Apache-2.0 for the library; proprietary for the hosted platform
PriceFree, self-hosted; you pay for computeLibrary free; hosted is 10,000 pages free, then $0.015 per page; Business is custom
LanguagesReleased checkpoints are English-focused; other languages need fine-tuningTable OCR ignores language settings (issue #1694)
Known failureUp to 558M parameters for one text line, slow versus CRNN recognizers on CPUOpen-source table cell content scores 0.426 versus 0.866 hosted; hi_res tables can cut off edges and drop first letters (issue #3262)

Sources

What each one is

TrOCR

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

TrOCR details

Unstructured

Document ETL for RAG. Partitions many file types into typed elements; open-source library too.

Unstructured 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": ["unstructured/unstructured"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

TrOCR alternativesUnstructured alternativesBest OCR models in 2026