Textsnap
github.com/kouhxp/textsnap- Category
- AI Tools
- Rank
- No. 1269Tools index
Previous survey · No. 1238 ·
- Pricing
- Open Source
- Type
- TOOL
- Use case
- Data Processing
- Interfaces
- CLI
- GitHub
- 198 stars
- Latest release
- v0.4.0
- Date
About
Textsnap turns screenshots, photos, image URLs and webpages into plaintext on the CPU with one command. It first runs PP-OCRv6 medium for detection and recognition, and passes shaky pages to the 0.9B PaddleOCR-VL-1.5 vision-language model for a second read. A structured mode sends pages straight to the model to keep tables and headings as markdown.
At a glance
Textsnap extracts text from images on your CPU and can use a larger model for difficult pages or structured output. It is worth evaluating when you regularly need text from screenshots and want recognition to run on your own machine.
Good fit
People extracting text from screenshots, scans or documents without a hosted OCR service.
Consider something else when
Use the original document when text is already selectable or you need guaranteed transcription accuracy.
Start here
Compare plain and structured output on a synthetic screenshot with a short table. Check that reading order and numbers match before using it on real material.
Cost and requirements
The MIT-licensed tool uses Python and CPU inference. Initial setup can fetch model files, and the optional larger model takes more storage.
Limits to know
URL input makes network requests even though recognition runs locally. Check small text, table cells and reading order against the image.
Sources checked 2026-11-05. Source-based assessment.
Read the source review
What it does
Textsnap is a local optical character recognition (OCR) tool: point it at an image, a link or your clipboard and it writes a UTF-8 text file. A small reader of about 140 MB handles most inputs. It scores its own output using per-line confidence plus a dictionary check, and below a 0.8 threshold it re-reads the image with a larger model of about 1.1 GB, fetched only when first needed. Clipboard input sends the result back to the clipboard, ready to paste. Nothing goes to a hosted API, and after the models are cached it works offline.
Why it's ranked here
The engineering is careful for a one-person project. Both model downloads are pinned to fixed revisions of the author's own mirrors and checked against SHA-256 digests embedded in the code, so an upstream change cannot swap the weights. Standard output carries only the path of the written file, which makes it easy to script. An offline test suite builds tiny stand-in models, so the core logic is tested without any download. It is MIT licensed and declares Python 3.9 through 3.13 on macOS, Linux and Windows.
What's good
The two-model design keeps the common case cheap: you pay for the large model only on images the small one reads badly, and you can turn the fallback off entirely to stay at about 140 MB. Batch runs load the models once and print each output path as soon as it is written, so a pipeline can start before the batch ends. A failed input is reported and skipped while the rest continue, with exit status 1 at the end. Copying the model files beside the script gives a folder that runs on an air-gapped machine with no install.
Tradeoffs
On first run the script installs any missing dependencies itself by calling pip into the current Python, which surprises anyone who manages environments by hand. The large model is a 1.1 GB download the first time a page needs it. Model files you supply yourself, through portable mode or a custom directory, skip the checksum check. Webpage mode reads only the most prominent image on the page, not the page text. The quality score checks words against an English dictionary unless you name other languages. The package marks itself Beta, and version 0.4 changed the default output.
How to use it well
It suits developers who grab text from screenshots and receipts and want a pipeable command with no API key. Install from pip, which adds two identical commands, textsnap and ocr. Run it with no argument after taking a screenshot, then paste. For tables, ask for structured mode, which skips the small model and keeps the large model's markdown. For speed on clean scans, set the quality threshold to 0 so it never falls back. For non-English documents, pass the language codes so good text is not sent for a second read. Local input covers image formats the Pillow library decodes, such as PNG, JPEG, WebP and TIFF.
Technical notes+
Everything lives in textsnap.py, which pyproject.toml ships as a single py-module with two console scripts (textsnap and ocr) pointing at main. Before importing numpy or onnxruntime it sets OMP_NUM_THREADS and related variables to a physical-core count read from /proc/cpuinfo, falling back to half of os.cpu_count(). _ensure_deps() shells out to pip install for any missing entry in REQUIRED. Downloads are pinned via HF_REVISION and PPOCR_HF_REVISION; EMBEDDED_CHECKSUMS covers the VLM files including the 424 MB embedding.onnx.data sidecar, and an external manifest, when present, takes precedence. The default vision encoder is q8, which a code comment says ran about 1.3x faster than q4 in the author's testing. test_textsnap.py stubs tokenizers and wordfreq and hand-encodes ONNX protobufs to test the embedding lookup and last-position logits patch against ONNX Runtime.
Observed
- License
- MIT
- Language
- Python, requires 3.9 or later
- Packaging
- pip package built from a single Python module
- Interface
- Command line, installed as two equivalent commands: textsnap and ocr
- Platforms
- macOS, Linux and Windows declared in package classifiers
- Runtime
- ONNX Runtime on CPU; no GPU required
- Model integrity
- Downloads pinned to fixed Hugging Face revisions and verified with SHA-256 digests
- Tests
- Offline test file using small hand-built ONNX models, no model download needed
Read from README.md, pyproject.toml, textsnap.py, test_textsnap.py, LICENSE.
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.