OCRRouter

Hunyuan OCR vs Tesseract.js

Pick Tesseract.js for in-browser OCR of clean printed text, where images must stay on the user's device and you want an Apache-2.0 library you can install from npm. Pick Hunyuan OCR for photos, scene text, image translation and historical scripts, where a ~1B model on your own GPU or laptop gives structured output. The main split is where it runs: Tesseract.js runs client side with plain text output, while Hunyuan OCR is a self-hosted model that returns Markdown, JSON and bounding boxes.

Hunyuan OCRtencent/hunyuan-ocrTesseract.jstesseract/tesseract-js
TypeOpen sourceOpen source
Price2 credits / page1 credit / page
Per 1,000 pages$2.00$1.00
Typical speed1.5 s / page2.0 s / page
Best forChinese documents and photosOCR in the browser
InputsPDF, imagesimages
Languages100+ languages100+ languages
Max pages per request500500
Tables✓ YesNo
HandwritingNoNo
Math✓ YesNo
Bounding boxes✓ Yes✓ Yes
ConfidenceNo✓ Yes
FormsNoNo
Multilingual✓ Yes✓ 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 Hunyuan OCR if

  • You need document parsing, text spotting, information extraction or image translation from one ~1B model.
  • You need structured output such as Markdown, HTML, LaTeX or JSON, plus bounding boxes.
  • You work with low-resource or ancient scripts, or large images up to 4K, and can run vLLM or a llama.cpp GGUF build.

Choose Tesseract.js if

  • You want OCR inside the browser or Node.js, with images that never leave the user's device.
  • You need the Apache-2.0 licence, with no regional restrictions and no user-count cap, and an install by npm, ESM or CDN script tag.
  • You read simple printed text in common languages, and need one of 100+ supported languages.

Key differences

Hunyuan OCRTesseract.js
How you run itSelf-hosted model via vLLM, Transformers or llama.cppJavaScript and WebAssembly library in the browser or Node.js
LicenceTencent Hunyuan Community License. Excludes the EU, UK and South Korea. A separate licence is needed above 100M monthly active users.Apache-2.0
PriceFree, self-hosted. You pay for compute.Free. Runs on the user's device or your server.
Output formatsMarkdown, HTML, LaTeX, JSON, plain text, bounding boxesPlain text, hOCR, bounding boxes
HardwareNVIDIA GPU with CUDA 13 recommended for the unified vLLM setup. llama.cpp GGUF path for CPU, consumer GPU or laptop.Any device that runs a browser or Node.js
BenchmarkParseBench-2 overall 67.11 and ParseBench mean 63.86 (v1.5)Not published
Known failureArchived 1.0 note says Transformers and vLLM outputs differed in accuracy. ParseBench-2 text score is 62.88 in public CI replay.No PDF input. Lower accuracy than the native Tesseract CLI on the same image. Fails on screen resolution text unless images are upscaled.

Sources

What each one is

Hunyuan OCR

Small end-to-end OCR model from Tencent covering parsing, extraction and photo translation.

Hunyuan OCR details

Tesseract.js

Tesseract compiled to JavaScript and WebAssembly, so OCR runs in the browser or in Node.js.

Tesseract.js 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 10 files at onceNo file?

Use one, fall back to the other

{"model": "tencent/hunyuan-ocr","fallbacks": ["tesseract/tesseract-js"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Hunyuan OCR alternativesTesseract.js alternativesBest OCR models in 2026