anonymizer
Offline document anonymizer for legal teams. Replaces personally identifiable information (PII) in documents with structured tokens before sending them to external AI services.
Status: MVP-0 release candidate.
What it does
Drag a file (docx / xlsx / pdf, including scanned PDFs when local OCR is available, plus txt / md / csv / html / rtf — RTF downloads as a fresh docx) into the local web UI and get an anonymized document where:
- Names, companies, financial details, addresses, emails, phones are replaced with structured tokens like
[Person_1],[Company_1],[ADDRESS_1], ... - Document metadata is cleared
- No network calls during processing — runs entirely on your machine
Then send the result to your AI tool of choice.
MVP-0 scope
- Formats:
docx,xlsx,pdfwith text layer, scanned PDF, hybrid PDF,txt,md,csv,html, andrtf(anonymized copy is delivered asdocx) - Languages: Russian and English by default; optional Spanish, German, and Italian NER packs; language-agnostic detectors for emails, phones, IBAN, cards, IP/MAC/URL, dates, and geocoordinates
- Platforms: Windows + macOS
- UI: local web app at
127.0.0.1in your browser - Install: single curl one-liner →
uv tool install docs-anonymizer
Scanned and hybrid PDFs use local Tesseract OCR with English and Russian language packs. Password-protected files, further detection languages, and editable recognized-DOCX export remain planned for later iterations.
Installation
# macOS / Linux
curl -fsSL https://anonymizer.site/install.sh | sh
# Windows (PowerShell)
iwr -useb https://anonymizer.site/install.ps1 | iex
Then run anonymize — your browser will open at http://127.0.0.1:<port>.
OCR setup for scanned PDFs
Scanned and hybrid PDFs require system Tesseract with English and Russian language packs. The anonymizer installer offers to install Tesseract interactively and shows an approximate download/install size before asking. If you skip it, DOCX, XLSX, and PDFs with a text layer still work.
# macOS
brew install tesseract tesseract-lang
# Ubuntu / Debian
sudo apt install tesseract-ocr tesseract-ocr-eng tesseract-ocr-rus
# Windows (PowerShell)
winget install UB-Mannheim.TesseractOCR
On macOS, Homebrew's tesseract-lang package is large because it bundles all
extra languages; expect up to roughly 720 MB on disk. Ubuntu/Debian and Windows
downloads are usually smaller, and the package manager may show the exact
download size.
After installing Tesseract, run:
anonymize doctor --no-network
If OCR is unavailable, scanned PDF processing is rejected with installation guidance instead of silently skipping scanned pages.
For installation problems and other common issues, see docs/troubleshooting.md.
Stack
Python 3.11+, FastAPI + htmx, spaCy + Natasha, PyMuPDF, python-docx, openpyxl, lxml. Full details in the technical spec.
Architecture
Three-layer design — core (headless Python library), cli, webapp (FastAPI on loopback) — plus testkit for synthetic test corpus generation and feedback loop tooling. Detectors are pluggable; language packs are drop-in. Manual masking + audit logging without PII leakage.
Licenses
The project is released under AGPL-3.0 because it depends on PyMuPDF (AGPL).
Optional language models retain their upstream licenses; in particular,
it_core_news_lg is CC BY-NC-SA 3.0 and is intended for non-commercial use.
The source distribution published with each release contains the project
source needed to satisfy AGPL source-availability obligations.
A page in the application UI will list all bundled libraries and models with their individual licenses.
Metadata
Release files for docs-anonymizer 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| docs_anonymizer-0.7.0.tar.gz | 1.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| docs_anonymizer-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.2 MB
Release files / docs_anonymizer-0.7.0.tar.gz
| Download URL | docs_anonymizer-0.7.0.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98d460841cdffe560be840faa8ac12ea28ab4451c7004105d1cf071f8f7fba52
|
|
BLAKE2b-256 checksum How to use checksums |
8bd15f7f1f1d4a2fafe6a5e6c72a82864d6b27b2b178c4f12f657a7cdfb036a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Release files / docs_anonymizer-0.7.0-py3-none-any.whl
| Download URL | docs_anonymizer-0.7.0-py3-none-any.whl |
|---|---|
| Size | 523.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6aab8ecc79e9935326e94c16158b3333e8db8b08da697d3f791cb1eeb7208f0
|
|
BLAKE2b-256 checksum How to use checksums |
75e5a385219b1800dcc73cc4c0599c40328da7ca6fe04de30ee62df4e3c450ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|