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-ocr | Tesseract.jstesseract/tesseract-js | |
|---|---|---|
| Type | Open source | Open source |
| Price | 2 credits / page | 1 credit / page |
| Per 1,000 pages | $2.00 | $1.00 |
| Typical speed | 1.5 s / page | 2.0 s / page |
| Best for | Chinese documents and photos | OCR in the browser |
| Inputs | PDF, images | images |
| Languages | 100+ languages | 100+ languages |
| Max pages per request | 500 | 500 |
| Tables | ✓ Yes | No |
| Handwriting | No | No |
| Math | ✓ Yes | No |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | No | ✓ Yes |
| Forms | No | No |
| Multilingual | ✓ Yes | ✓ 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 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 OCR | Tesseract.js | |
|---|---|---|
| How you run it | Self-hosted model via vLLM, Transformers or llama.cpp | JavaScript and WebAssembly library in the browser or Node.js |
| Licence | Tencent Hunyuan Community License. Excludes the EU, UK and South Korea. A separate licence is needed above 100M monthly active users. | Apache-2.0 |
| Price | Free, self-hosted. You pay for compute. | Free. Runs on the user's device or your server. |
| Output formats | Markdown, HTML, LaTeX, JSON, plain text, bounding boxes | Plain text, hOCR, bounding boxes |
| Hardware | NVIDIA 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 |
| Benchmark | ParseBench-2 overall 67.11 and ParseBench mean 63.86 (v1.5) | Not published |
| Known failure | Archived 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
- HunyuanOCR model card
- Hunyuan Community License
- HunyuanOCR GitHub
- Tesseract.js GitHub README
- Issue #251 accuracy vs CLI
What each one is
Hunyuan OCR
Small end-to-end OCR model from Tencent covering parsing, extraction and photo translation.
Hunyuan OCR detailsTesseract.js
Tesseract compiled to JavaScript and WebAssembly, so OCR runs in the browser or in Node.js.
Tesseract.js 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": "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