Description
light-ocr is a fast OCR library for Node.js and C++ that runs offline on your machine. It recognizes text in PDF, JPEG and PNG files or raw image data, and returns lines in reading order with confidence scores and quadrilateral coordinates. The Node.js package includes the PP-OCRv6 Small model, PDFium for PDF pages, a Chinese fallback font and prebuilt components for macOS, Linux and Windows, so there are no postinstall or first-run downloads. The README says it uses Core ML and WebGPU acceleration where available, and the engine chooses the execution mode for each platform. If your application already decodes images, recognize() also accepts GRAY8, RGB8, BGR8 and RGBA8 pixel data. The package works with CommonJS, ESM and TypeScript, and includes prebuilt binaries for eight platforms. The command line tool offers recognize, detect (boxes only), info and doctor commands.…
Highlights
- Offline OCR for images and PDF pages
- Lines with confidence scores and coordinates
- Core ML and WebGPU acceleration
- CommonJS, ESM and TypeScript support
- Command line tool with recognize and detect
- Prebuilt binaries for macOS, Linux and Windows
Ratings & Reviews
No ratings yet
Be the first to rate Light OCR.
People also visit
Macos Vision OCR
A powerful command-line OCR tool built with Apple's Vision framework…
Light OCR FAQ
What is light-ocr?
A fast, offline OCR library for Node.js and C++ that reads text from images and PDF files on your machine.
What inputs does it accept?
JPEG, PNG, PDF, encoded bytes or decoded pixel buffers.
Do I need an internet connection?
No. The package includes the model and components, with no postinstall or first-run downloads.
Which Node.js versions are supported?
Node.js 22 or newer. The 22 and 24 LTS lines are fully tested.
Is there a command line tool?
Yes. light-ocr offers recognize, detect, info and doctor commands, and a PDF path is routed to document OCR.
What are the best Light OCR alternatives?
Popular alternatives to Light OCR include Tesseract.js, Android OCR and MixTeX-Latex-OCR. See all Light OCR alternatives



