Tesseract.js
Reasonable, with limits. 5th of 7 machine learning in JavaScript.
Tesseract.js is a WebAssembly port of the Tesseract OCR engine. It reads printed text from images in the browser or in Node.js, in more than 100 languages. For on-device OCR in JavaScript it is still the easiest choice that works well. But development has slowed to about one release a year, and it is weaker on messy scans, page layout and PDFs.
Best for: Apps that need free, private OCR of clean printed text, run in the browser or in Node.js without a server.
Scores
Overall6.6
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It is the practical default for on-device OCR in JavaScript, and v7 is a solid, faster release. Slow maintenance, accuracy behind modern OCR models, and no PDF or layout support keep it out of the strong-pick band. Choose it for clean printed text. For PDFs use Scribe.js, and for hard documents use a heavier model or a server.
- github.com/naptha/tesseract.js/releases: v7.0.0 released December 2025
- github commitsLastYear: Low activity
- lilting.ch/en/articles/ocr-web-2025: Easiest in-browser OCR, with clear limits
GPT-6.2 Sol: 7.1, likely 5.9 to 8.2
Tesseract.js is a strong choice for new apps that need local OCR on screenshots and clear scans. Transformers.js is a better category-wide choice when the app needs several kinds of model inference. Slow releases and uneven results on harder images limit how confidently it can be recommended for broader document workflows.
- thiagotigaz.github.io/ocr-it/bench: Strong speed and accuracy on rendered text, with a narrow test corpus.
- huggingface.co/docs/transformers.js/en/index: Peer covers text, vision, audio, and multimodal inference.
- github commitsLastYear and releasesLastYear: Four commits and one release reduce confidence in timely fixes.
- github.com/naptha/tesseract.js/blob/master/docs/faq.md: PDF workflows need a separate rendering step.
Needed by many3.4
How many developers need a tool for this job?
Claude Opus 5.5: 3.5, likely 2.5 to 4.5
OCR is one clear niche inside on-device machine learning. Peers like Transformers.js and MediaPipe cover many tasks, while this tool covers one. Still, reading text from images or scans comes up often in document, receipt and form apps.
- github description: Single job: OCR in more than 100 languages
- lilting.ch/en/articles/ocr-web-2025: Described as the only practical in-browser option for Japanese OCR
GPT-6.2 Sol: 3.2, likely 2.1 to 4.4
Local OCR serves a clear niche in scanning, search, accessibility, and browser extensions. Browser and Node.js support make it usable across several kinds of app, while its scope is limited to text recognition. State of JavaScript gives some context for how uncommon machine learning is among respondents, but it does not measure OCR use directly.
- 2025.stateofjs.com/en-US/usage: 242 of 10,926 respondents selected machine learning as a JavaScript use case.
- npmjs.com/package/tesseract.js?activeTab=code: Image OCR in browsers and Node.js.
Helps a lot6.9
How well does it do the job for those who need it?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It is reliable and easy to use for clean printed text, and v7 made it faster. Its accuracy depends heavily on image quality, and it has no layout analysis or PDF input. Modern models such as PaddleOCR or vision LLMs read hard documents better, but their JavaScript ports are less mature, so Tesseract.js stays the practical default.
- github.com/naptha/tesseract.js/releases: v7 runs about 15-35% faster. v6 fixed memory leaks and changed output defaults.
- lilting.ch/en/articles/ocr-web-2025: Accuracy rated fair. It depends on font and resolution and has no layout support.
- npm-compare.com/ocr-space-api-wrapper,tesseract.js: No PDF support and no changes to the recognition model
- npm hasTypes: TypeScript types are included
GPT-6.2 Sol: 7.7, likely 6.5 to 8.8
Version 7 has a straightforward typed worker API, with documented examples that give coding agents a clear pattern to follow. An independent benchmark found fast recognition and roughly 0.1% character error on 24 synthetic screenshots. A developer reported needing preprocessing for phone photos, and another reported that v7 can abort with certain high-accuracy language models on Node.js 22. PDF input requires a renderer, and the small benchmark leaves real-world accuracy less certain.
- raw.githubusercontent.com/naptha/tesseract.js/v7.0.0/docs/api.md: Documents worker setup, recognition options, progress, and structured output.
- npm hasTypes: The package includes TypeScript declarations.
- thiagotigaz.github.io/ocr-it/bench: Independent v7 benchmark on a small synthetic screenshot corpus.
- reddit.com/r/javascript/comments/1xqqa4b/making_browser_ocr_read_real_phone_photos: A browser OCR developer reports poor results on phone photos before preprocessing.
- github.com/naptha/tesseract.js/issues/1080: Open report of a v7 failure with tessdata_best models on Node.js 22.
- github.com/naptha/tesseract.js/blob/master/docs/faq.md: PDF input needs an external renderer.
Holds up over time4.6
Will it still be a good choice in two years?
Claude Opus 5.5: 4.5, likely 3.0 to 6.0
There were only 4 commits and 1 release (v7, December 2025) in the last year, and 28 pull requests are open. The Scorecard Maintained check is 0. The project is mature and still gets meaningful releases, but it rests on a small volunteer group. Breaking changes come in each major version (v5 and v6 both changed the API).
- github commitsLastYear: 4 commits in the last year
- scorecard Maintained: Scored 0
- github openPullRequests: 28 open pull requests
- github.com/naptha/tesseract.js/releases: Breaking changes in v5 and v6. v7 drops Node.js 14.
GPT-6.2 Sol: 4.7, likely 3.3 to 6.2
Four commits and one release in the past year put it well behind Transformers.js and MediaPipe Tasks in maintenance activity. Recent bug-fix pull requests are still open, and the latest release of both the wrapper and its WebAssembly core came from the same maintainer. Version 6 changed default outputs and version 7 dropped Node.js 14, so major upgrades can require code changes. Public funding is modest, and future release capacity is hard to assess.
- github commitsLastYear, releasesLastYear and peers: Four commits and one release, against 172 commits for Transformers.js and 937 for MediaPipe.
- github.com/naptha/tesseract.js/pulls: Worker and type fixes remain open.
- github.com/naptha/tesseract.js/releases: v6 changed output defaults and v7 dropped Node.js 14.
- github.com/naptha/tesseract.js-core/releases/tag/v7.0.0: The same maintainer published the latest core and wrapper releases.
- opencollective.com/tesseractjs: Public funding consists of small donations.
Used widely5.8
How many use it, and is that growing?
Claude Opus 5.5: 6.0, likely 5.0 to 7.5
Downloads rose from 1.7M to 23.5M per 4 weeks, a ratio of about 13.7 against a median of 4.1. Much of that is probably transitive installs through document parsers such as officeParser, not direct choices. There are 2,209 dependent repositories, fewer than TensorFlow.js (8,947) and MediaPipe (4,257) but solid for a single-task tool. Its 38.8k stars are the most in the category.
- npm downloadsLast4Weeks: 23.5M now, against 1.7M a year ago
- dependents: 2,209 repositories and 216 packages
- github.com/harshankur/officeParser/discussions/86: officeParser lazy-loads tesseract.js, a source of transitive installs
- github stars: 38,848 stars
GPT-6.2 Sol: 5.5, likely 4.1 to 6.9
Four-week npm installs grew 13.7× year over year, ahead of the 4.1× catalog baseline and behind Transformers.js at about 29×. Ecosyste.ms indexes 2,209 dependent repositories and 216 packages, below TensorFlow.js and MediaPipe Tasks by repository count despite Tesseract.js leading the group in stars. Automated and transitive installs can inflate npm totals, CDN use goes uncounted, and four tracked Bluesky posts provide little confirmation of how many new projects chose it.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo and medianDownloadsRatio: 23.5 million versus 1.72 million installs, with a 4.1× catalog baseline.
- dependents, github stars and peers: 2,209 indexed repositories, 216 packages, and 38,848 stars.
- bluesky posts: Four repository links in 24 months.
- cdnjs.com/libraries/tesseract.js: CDN builds provide an adoption path outside npm installs.
Vouched for5.6
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 3.5 to 6.5
It is widely used as a dependency and covered in many tutorials and independent write-ups. No developer survey rates it, and there are no rigorous independent benchmarks. Users report mixed accuracy, good on clean print and poor on degraded scans.
- lilting.ch/en/articles/ocr-web-2025: An independent 2025 test found it usable but limited
- iunera.com/kraken/enterprise-ai/receipt-ocr-with-llms-vs-tesseract-what-actually-changed: Reads characters well, but receipt structure needs extra parsing
- hackerNews: Only 2 minor stories
GPT-6.2 Sol: 6.2, likely 4.9 to 7.5
The OCR Image Reader Chrome extension ships Tesseract.js and lists 200,000 users. OCR It also ships it and publishes a reproducible v7 benchmark, while the Obsidian Text Extractor plugin provides an older example of use. The benchmark covers a narrow workload, and evidence of broader production use or project-specific developer satisfaction is thin.
- chromewebstore.google.com/detail/ocr-image-reader/bhbhjjkcoghibhibegcmbomkbakkpdbo?hl=en-US: A shipped extension uses Tesseract.js and lists 200,000 users.
- thiagotigaz.github.io/ocr-it/bench: Another extension ships the library and publishes its test method and results.
- github.com/scambier/obsidian-text-extractor: The now-unmaintained Obsidian plugin uses Tesseract.js for image extraction.
Safe5.8
How safe is it to depend on?
Claude Opus 5.5: 6.0, likely 5.0 to 7.5
There is one moderate advisory, from 2019, and none in the last 24 months. It has 9 dependencies and an Apache-2.0 licence. The Scorecard score is low at 4.2, with weak code review, branch protection and token permissions. By default it fetches its WASM core and language data from a CDN at runtime, which adds supply-chain exposure unless you self-host.
- advisories: 1 advisory in total, from 2019
- scorecard score: 4.2. Code-Review is 2 and Branch-Protection is 0.
- npm dependencies: 9 dependencies
- lilting.ch/en/articles/ocr-web-2025: Language data is downloaded from a CDN on first use
GPT-6.2 Sol: 5.6, likely 4.1 to 7.0
The package has a permissive Apache-2.0 license and nine direct dependencies. Its one recorded npm advisory was fixed in 1.0.19. OpenSSF scores it 4.2, with weak branch protection, workflow token permissions, and dependency pinning, and release provenance remains unverified. The WebAssembly build also bundles native code, and the applicability of recent upstream Tesseract advisories to that build remains uncertain.
- npm license, dependencies and advisories: Apache-2.0, nine direct dependencies, and zero package advisories in the past 24 months.
- github.com/advisories/GHSA-83rx-c8cr-6j8q: The 2019 default-configuration issue was fixed in 1.0.19.
- scorecard score and checks: 4.2 overall, with packaging and release signing unscored.
- github.com/naptha/tesseract.js-core/blob/v7.0.0/.gitmodules: The WebAssembly core includes a Tesseract fork and native image libraries.
- github.com/tesseract-ocr/tesseract/security/advisories: Recent upstream advisories have unverified applicability to the JavaScript build.
Good
- Runs fully on the device, in a Web Worker or in Node.js. It supports more than 100 languages and needs no cloud API.
- The API is simple: createWorker('eng') and then recognize(). Types are included, and there are many tutorials that AI agents have learned from.
- v7 adds relaxed-SIMD builds and cuts runtime by about 15-35%. v6 fixed memory leaks.
- It has had one advisory, from 2019, and none since. The licence is the permissive Apache-2.0.
Bad
- It uses the stock Tesseract LSTM models. Accuracy drops on noisy or skewed scans, handwriting and complex layouts.
- It cannot read PDFs and does no layout analysis. The maintainers point users to Scribe.js for those jobs.
- Development is slow: only 4 commits in the last year, 28 open pull requests, and a Scorecard Maintained score of 0.
- By default it downloads large language files from a CDN at runtime, for example about 14 MB for Japanese. Offline use needs self-hosting.
The numbers
- npm downloads, 4 weeks
- 24M ×14 in a year
- GitHub stars
- 39k
- Commits, 12 months
- 4
- npm version
- 7.0.0 Dec 2025
- Versions, 12 months
- 1
- Advisories, 24 months
- 0 of 1 ever
- OpenSSF Scorecard
- 4.2 out of 10, Nov 2026
- Licence
- Apache-2.0
Read on 21 November 2026 from GitHub (naptha/tesseract.js), npm (tesseract.js), OSV and the OpenSSF Scorecard.
Machine learning in JavaScript
- 8.4Transformers.js
- 7.8MediaPipe Tasks
- 7.1node-llama-cpp
- 6.8WebLLM
- 6.6Tesseract.js
- 4.5TensorFlow.js
- 2.7brain.js