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/trocr | Unstructuredunstructured/unstructured | |
|---|---|---|
| Type | Open source | OCR API |
| Price | 1 credit / page | 20 credits / page |
| Per 1,000 pages | $1.00 | $20.00 |
| Typical speed | 1.2 s / page | 3.0 s / page |
| Best for | Handwritten text lines | Mixed file types into RAG |
| Inputs | images | PDF, images, DOCX |
| Languages | English | Multilingual |
| Max pages per request | 100 | 1,000 |
| Tables | No | ✓ Yes |
| Handwriting | ✓ Yes | No |
| Math | No | No |
| Bounding boxes | No | ✓ Yes |
| Confidence | No | No |
| Forms | No | No |
| Multilingual | No | ✓ Yes |
| 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 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
| TrOCR | Unstructured | |
|---|---|---|
| Input it reads | Single text-line images only; you need a separate line detector | Whole files: PDFs, HTML, Word, PowerPoint, emails and images |
| Output | Plain text only; no layout, table or page-level output | JSON, HTML, plain text and bounding boxes, split into typed elements |
| How you run it | Library only, run locally through Hugging Face transformers | Self-host the open-source library or use the hosted API |
| Licence | MIT (microsoft/unilm repository) | Apache-2.0 for the library; proprietary for the hosted platform |
| Price | Free, self-hosted; you pay for compute | Library free; hosted is 10,000 pages free, then $0.015 per page; Business is custom |
| Languages | Released checkpoints are English-focused; other languages need fine-tuning | Table OCR ignores language settings (issue #1694) |
| Known failure | Up to 558M parameters for one text line, slow versus CRNN recognizers on CPU | Open-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 detailsUnstructured
Document ETL for RAG. Partitions many file types into typed elements; open-source library too.
Unstructured 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": "microsoft/trocr","fallbacks": ["unstructured/unstructured"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
TrOCR alternativesUnstructured alternativesBest OCR models in 2026