Tesseract.js is a JavaScript library that performs optical character recognition on images in the browser and Node.js using WebAssembly.
The tool solves the problem of extracting text from images across more than one hundred languages without requiring server-side processing. It works by wrapping a WebAssembly port of the Tesseract OCR engine, allowing recognition to run entirely client-side. Users create a worker, call recognize on image data, and terminate the worker when done. The library supports multiple deployment patterns: it can be loaded via CDN with a script tag, bundled with webpack, imported as an ES module, or run on Node.js.
Tesseract.js suits projects where client-side text extraction is acceptable and server infrastructure for OCR is unavailable or undesirable. It works with images in various formats and handles real-time video recognition through a companion library. Developers should be aware that the project explicitly does not support PDF files and does not modify Tesseract's recognition model to improve accuracy beyond what the underlying engine provides. The tool is a wrapper around existing Tesseract functionality rather than an enhancement to it.
The project maintains active continuous integration with linting and testing workflows, performs static analysis through CodeQL checks, and receives financial contributions through an open collective. Development follows the Airbnb code style standard.