OCRRouter

TrOCR vs Google Cloud Vision OCR

Pick Google Cloud Vision OCR for photos, PDFs and high-volume plain text extraction, where you want an API that returns word boxes and handles handwriting. Pick TrOCR when you already have cropped single-line images, want to run the model yourself under an MIT licence, or plan to fine-tune a recognizer. The main split is scope: TrOCR reads one text line at a time, while Cloud Vision reads whole images and documents.

TrOCRmicrosoft/trocrGoogle Cloud Vision OCRgoogle/cloud-vision
TypeOpen sourceOCR API
Price1 credit / page2 credits / page
Per 1,000 pages$1.00$2.00
Typical speed1.2 s / page1.0 s / page
Best forHandwritten text linesPhotos and simple scans
InputsimagesPDF, images
LanguagesEnglish100+ languages
Max pages per request1002,000
TablesNoNo
Handwriting✓ Yes✓ Yes
MathNoNo
Bounding boxesNo✓ Yes
ConfidenceNo✓ Yes
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

  • You want a self-hosted model under the MIT licence with no per-request fee, only your own compute cost.
  • You need English handwritten lines, where the large model reports 2.89 character error rate on IAM.
  • You plan to fine-tune a recognizer on your own line images, starting from separate handwritten (IAM), printed (SROIE) and scene text checkpoints.

Choose Google Cloud Vision OCR if

  • You need to process whole images or documents, with page, block, paragraph, word and symbol output and bounding polygons.
  • You want a hosted API with a free tier of 1,000 units per month per feature, then $1.50 per 1,000 units and $0.60 per 1,000 above 5M.
  • You are reading photos of signs and labels, handwritten notes or batches of up to 2,000 image files per async request.

Key differences

TrOCRGoogle Cloud Vision OCR
Input scopeSingle text-line images only. You need a separate line detector.Whole images and documents. TEXT_DETECTION for photos, DOCUMENT_TEXT_DETECTION for dense text.
How you run itLocally through Hugging Face transformers.Hosted REST API or client libraries on Google Cloud. No on-premise deployment.
LicenceMIT (microsoft/unilm repository)Proprietary
PriceFree, self-hosted. You pay for compute.First 1,000 units per month free per feature, then $1.50 per 1,000 units up to 5M, $0.60 per 1,000 above. Billing must be enabled even for the free units.
OutputPlain text only. No layout, table or page-level output.JSON, plain text and bounding boxes. No tables, no Markdown, so you rebuild reading order yourself.
Handwriting2.89 CER on IAM with TrOCR-large. English-focused checkpoints.Supported via DOCUMENT_TEXT_DETECTION and language hints. Benchmark not published.
Languages and PDFsEnglish-focused checkpoints. Other languages need fine-tuning. Not for PDFs.Language hints supported. PDF and TIFF need async processing via Cloud Storage.

Sources

What each one is

TrOCR

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

TrOCR details

Google Cloud Vision OCR

Google Cloud's image OCR with text and document text detection, word boxes and confidence.

Google Cloud Vision 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": ["google/cloud-vision"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

TrOCR alternativesGoogle Cloud Vision OCR alternativesBest OCR models in 2026