SnipOCR — automatic local OCR when you take a screenshot.
Works on Windows and macOS. When you capture the screen, SnipOCR:
- Detects the new screenshot (clipboard and/or screenshot folder)
- Runs on-device OCR (no cloud)
- Puts the text on your clipboard
- Shows a popup so you can review / edit / re-copy
| Windows | macOS | |
|---|---|---|
| Capture | Snipping Tool (Win+Shift+S) |
Screenshot (⌘⇧4, ⌘⌃⇧4 for clipboard) |
| OS OCR | Windows.Media.Ocr | Apple Vision |
| Neural OCR | RapidOCR + ONNX Runtime (same on both) | RapidOCR + ONNX Runtime |
| Clipboard | win32 clipboard listener | Pasteboard changeCount poll |
| File saves | Pictures\Screenshots |
Desktop / Pictures/Screenshots |
| Config | %APPDATA%\SnipOCR\ |
~/Library/Application Support/SnipOCR/ |
| Logs | %LOCALAPPDATA%\SnipOCR\ |
~/Library/Logs/SnipOCR/ |
All engines are fully offline after install (RapidOCR downloads ONNX models once on first use).
SnipOCR supports three backends:
| Engine id | Name | Platform | Notes |
|---|---|---|---|
auto |
OS default | Win / Mac | Windows OCR or Apple Vision |
windows |
Windows OCR | Windows | Language packs via Windows Capability |
macos |
macOS Vision | macOS | Built-in Vision framework |
rapid |
RapidOCR (ONNX) | Win + Mac (+ Linux) | Light PP-OCR models via ONNX Runtime |
- Same quality/behavior on Windows and macOS
- No Windows OCR language-pack setup
- Strong multi-language recognition (Chinese, Japanese, Korean, Latin, Arabic, …)
- Optional acceleration: DirectML (Windows), CoreML (macOS), CUDA (NVIDIA)
OS engines remain the lightest install path for pure English UI snips.
- Python 3.11+
- Windows 10/11 or macOS 12+
- Platform OCR (optional if you only use RapidOCR):
- Windows: OCR language pack (usually
en-USalready installed) - macOS: built-in Vision
- Windows: OCR language pack (usually
- RapidOCR (recommended for cross-platform AI OCR):
rapidocr+onnxruntime(installed viarequirements.txt)- First run downloads small ONNX models (~10–20 MB typical)
Open Windows PowerShell as Administrator:
Get-WindowsCapability -Online | Where-Object { $_.Name -Like 'Language.OCR*' }
Get-WindowsCapability -Online |
Where-Object { $_.Name -Like 'Language.OCR*en-US*' } |
Add-WindowsCapability -OnlineOr:
.\scripts\install_ocr_lang.ps1 -Language en-US- Screen Recording permission is not required; SnipOCR only reads the clipboard and screenshot files you already captured.
- Notifications use
osascript(standard user notification).
# Windows — DirectML (many AMD/Intel/NVIDIA GPUs)
pip uninstall -y onnxruntime onnxruntime-gpu onnxruntime-directml
pip install onnxruntime-directml
# NVIDIA CUDA (any OS with a matching CUDA toolkit)
pip uninstall -y onnxruntime onnxruntime-gpu onnxruntime-directml
pip install onnxruntime-gpumacOS: the standard onnxruntime wheel may expose CoreML. Leave rapidocr_accel on auto.
Then set in config (or tray → RapidOCR acceleration):
"rapidocr_accel": "dml"or "coreml" / "cuda" / "cpu".
cd path\to\snipocr
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python main.pyOr:
.\scripts\run.ps1cd path/to/snipocr
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python main.pyOr:
chmod +x scripts/run.sh
./scripts/run.shA tray / menu-bar icon appears. Take a screenshot — text is OCR’d and copied.
macOS tip: hold Control while capturing (⌘⌃⇧4) to put the snip on the clipboard directly. File-based captures on Desktop are also watched.
- Tray → OCR engine → RapidOCR (ONNX)
- Or edit config:
"ocr_engine": "rapid"First recognition may download models (one-time). Subsequent snips stay local and fast.
Optional: pre-download default models:
rapidocr download_models| Action | What it does |
|---|---|
| Enable / Disable SnipOCR | Master switch |
| Enable OCR all images | OCR any clipboard image (not only screenshot tools) |
| Show last result | Re-open the last OCR popup |
| OCR engine | Radio: OS default / Windows or Vision / RapidOCR (ONNX) |
| RapidOCR model | Auto / Small / Mobile / Server / Tiny |
| RapidOCR acceleration | Auto / CPU / CoreML / DirectML / CUDA |
| Quit | Exit |
By default SnipOCR only OCRs images when:
- A screenshot process was recently active
(Windows:ScreenClippingHost/ Snipping Tool · macOS:screencapture/ Screenshot), or - A new screenshot-like file appears in a known folder, or
- (Windows) the clipboard owner is a snipping process
That avoids OCR-ing random images you copy from a browser.
Turn on OCR all images from the tray if you want every clipboard image processed.
Clipboard + file paths are de-duplicated so the same snip is not OCR’d twice.
Stored at:
| Platform | Path |
|---|---|
| Windows | %APPDATA%\SnipOCR\config.json |
| macOS | ~/Library/Application Support/SnipOCR/config.json |
| Key | Default | Meaning |
|---|---|---|
enabled |
true |
Master switch |
ocr_engine |
auto |
auto / windows / macos / rapid |
ocr_language |
en-US |
Preferred language (BCP-47 or RapidOCR alias) |
replace_clipboard_with_text |
true |
Put OCR text on clipboard |
ocr_all_clipboard_images |
false |
Skip snip-process filter |
watch_screenshot_folders |
true |
Watch Desktop / Screenshots folders |
show_popup |
true |
Show result window |
popup_autohide_seconds |
8 |
Auto-hide popup (0 = stay) |
show_toast |
true |
Desktop notifications |
collapse_single_newlines |
false |
Join soft line breaks into spaces |
| Key | Default | Meaning |
|---|---|---|
rapidocr_model_type |
auto |
auto / small / mobile / server / tiny |
rapidocr_ocr_version |
auto |
auto / PP-OCRv6 / PP-OCRv5 / PP-OCRv4 |
rapidocr_use_cls |
true |
Run text-line orientation classifier |
rapidocr_text_score |
0.5 |
Drop lines below this confidence |
rapidocr_accel |
auto |
auto / cpu / dml / coreml / cuda |
rapidocr_intra_op_threads |
-1 |
ONNX Runtime intra-op threads (-1 = library default) |
rapidocr_inter_op_threads |
-1 |
ONNX Runtime inter-op threads |
Model tips
| Preset | Typical use |
|---|---|
auto |
English → mobile PP-OCRv4; otherwise small PP-OCRv6 (fast multi-lang) |
small |
Default modern path (PP-OCRv6 small when available) |
mobile |
Smaller / older mobile models |
server |
Heavier, higher accuracy |
tiny |
Experimental; may fall back if unsupported for your language |
Language mapping (ocr_language → RapidOCR)
| Examples | RapidOCR rec model |
|---|---|
en, en-US |
en |
zh-CN, zh |
ch (Chinese + often English) |
zh-TW, zh-HK |
chinese_cht |
ja, ja-JP |
japan |
ko, ko-KR |
korean |
de, fr, es, pt, … |
latin |
ru, uk, … |
cyrillic |
ar, hi, th, el, … |
matching script models |
If a language + model combo is unavailable, SnipOCR automatically falls back to a working combination.
Example config for cross-platform neural OCR:
{
"enabled": true,
"ocr_engine": "rapid",
"ocr_language": "en-US",
"rapidocr_model_type": "auto",
"rapidocr_ocr_version": "auto",
"rapidocr_use_cls": true,
"rapidocr_text_score": 0.5,
"rapidocr_accel": "auto",
"replace_clipboard_with_text": true,
"show_popup": true,
"show_toast": true
}Logs:
| Platform | Path |
|---|---|
| Windows | %LOCALAPPDATA%\SnipOCR\snipocr.log |
| macOS | ~/Library/Logs/SnipOCR/snipocr.log |
snipocr/
main.py
assets/ # brand logo + icons
app/
platform_util.py # OS detection, paths, hints
clipboard_io.py # cross-platform facade
clipboard_io_win.py
clipboard_io_mac.py
clipboard_watcher.py
screenshot_watcher.py
snip_detector.py
service.py
result_ui.py
tray.py
settings.py
notifications.py
paths.py
ocr/
base.py # OCREngine protocol + OCRResult
windows_ocr.py # Windows.Media.Ocr
macos_ocr.py # Apple Vision
rapid_ocr.py # RapidOCR + ONNX Runtime
scripts/
run.ps1
run.sh
install_ocr_lang.ps1
generate_logo.py
Install the OCR language pack (see above). Confirm:
# Windows PowerShell 5.x
[Windows.Media.Ocr.OcrEngine, Windows.Foundation, ContentType = WindowsRuntime] | Out-Null
[Windows.Media.Ocr.OcrEngine]::AvailableRecognizerLanguagesOr switch to RapidOCR: tray → OCR engine → RapidOCR (ONNX).
pip install 'pyobjc-framework-Vision' 'pyobjc-framework-Quartz' 'pyobjc-framework-Cocoa'pip install -U rapidocr onnxruntimeFirst use needs network once to download models (ModelScope CDN). After that, fully offline.
Pre-download:
rapidocr download_models
rapidocr check- Cold start loads ONNX sessions; later snips are much faster.
- Prefer
rapidocr_model_type: "auto"or"small". - Enable GPU EP if available (
dml/coreml/cuda). - Huge screenshots are downscaled (max side 2000 px).
- Is the tray icon enabled?
- Did you use the OS screenshot tool?
- Try Enable OCR all images once to test the OCR path.
- Check the log file paths above.
- On macOS, prefer
⌘⌃⇧4(clipboard) or ensure Desktop/Screenshots is writable.
If no text was found, the image is left on the clipboard on purpose.
- OCR runs locally (Windows.Media.Ocr, Apple Vision, or RapidOCR/ONNX)
- No cloud OCR API in the default path
- RapidOCR may download model weights once from RapidAI/ModelScope on first use
- OCR text is not written to disk by default (only logs metadata)
MIT — use freely.
