# tesseract.js

> Pure Javascript OCR for more than 100 Languages

- Type: agent or tool
- Field: Image & Design
- Repository: https://github.com/naptha/tesseract.js
- GitHub stars: 38851
- Licence: Apache-2.0
- Language: JavaScript
- Last push: 2026-05-17
- Page: https://imutechz.in/agents/tesseract.js

## What it is
Tesseract.js is a pure JavaScript OCR library that extracts text from images in over 100 languages. It wraps a WebAssembly port of the Tesseract OCR engine and runs in both browsers and Node.js. Developers create a worker, recognize images, and terminate the worker when done.

## Features
- 100+ language support
- Runs in browser via CDN, ESM, or webpack
- Runs on Node.js (v16+ for v7)
- WebAssembly port of Tesseract OCR
- Worker-based async API
- Supports common image formats

## Best for
- Browser-based OCR applications
- Node.js text extraction pipelines
- Multi-language document scanning
- Real-time image recognition

## Pros
- Pure JavaScript with no native dependencies
- Works in both browser and server environments
- Large language coverage
- WebAssembly performance

## Cons
- No PDF support
- Does not improve core Tesseract accuracy
- Requires Node.js v16 or newer for v7

## Install
```
npm install tesseract.js
```

## Usage
```
import { createWorker } from 'tesseract.js';

(async () => {
  const worker = await createWorker('eng');
  const ret = await worker.recognize('https://tesseract.projectnaptha.com/img/eng_bw.png');
  console.log(ret.data.text);
  await worker.terminate();
})();
```

Tags: ocr, javascript, typescript, webassembly, browser, nodejs, text-extraction, computer-vision
