tesseract.js is a JavaScript OCR library that extracts words from images in almost any language in both browsers and Node.js. It wraps the Tesseract OCR engine via WebAssembly and exposes a worker-based recognition API.
Project overview
It makes the Tesseract OCR engine usable directly from JavaScript in both browser and Node.js runtimes, covering almost any language, with a short install-and-recognize path.
Project type
Document Processing
Use cases
Documents & Office
Deployment
Refer to project documentation
License
Apache-2.0
Best for
Developers building JavaScript applications in browsers or Node.js who need to extract recognized text from images across almost any language.
Key capabilities
Recognizes words from images in almost any language and returns the recognized text for JavaScript applications.
Runs the OCR library in browser environments and on servers using Node.js.
Creates OCR workers that recognize one or more images and can be terminated after processing.
Limitations and risks
The project does not support PDF files; image inputs are required.
The project does not modify the Tesseract recognition model to improve accuracy.
Getting started
Install tesseract.js with npm or yarn, create a worker with a language, then call worker.recognize on an image. The README describes usage as simple after installation.
Alternatives and comparisons
The underlying OCR engine that tesseract.js accesses via a WebAssembly port; consider it when you are not limited to JavaScript runtimes. Evaluate its capabilities on its own before adopting.
A candidate to evaluate if you need input formats such as PDF, which this project does not support; verify its capabilities on its own before adopting.
A candidate to evaluate if you need outputs beyond plain recognized text; verify its capabilities on its own before adopting.
GitHub project description: Pure Javascript OCR for more than 100 Languages 📖🎉🖥
README: Tesseract.js is a javascript library that gets words in [almost any language](./docs/tesseract_lang_list.md) out of images.
README: Tesseract.js works in the browser using [webpack](https://webpack.js.org/), esm, or plain script tags with a [CDN](#CDN) and on the server with [Node.js](https://nodejs.org/en/).