Tesseract.js wraps a WebAssembly port of the Tesseract engine to extract text from images in browsers or Node. It supports many languages and returns text with optional layout metadata.
Overview
The library recognizes words from images client-side or on a server without calling a hosted OCR API. It works via script tags and CDNs, bundlers, or npm on Node, using workers that should be reused across multiple images and terminated when finished.
Scope matches the core Tesseract feature set in WASM form, without PDF ingestion or proprietary model changes inside this project. Documentation points to a sibling library for PDF extraction and enhanced accuracy when those needs exceed this package.
Recent versions emphasize smaller default language data, lower memory use, and optional output formats such as hOCR or block structures when explicitly enabled. Demos cover still images and real-time video recognition in the browser.
Key features
- 100 plus language models
- Browser and Node.js runtimes
- WebAssembly-backed recognition
- Worker-based processing pipeline
- Orientation and script detection
- Paragraph, word, and box outputs
- CDN, ESM, and npm installs
- Scheduler pattern for batch jobs
Use cases
- Client-side document text capture
- Server image transcription pipelines
- Live camera OCR in web apps
- Multilingual image accessibility