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.8.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| docs_anonymizer-0.8.2.tar.gz | 1.8 MB | Without provenance | Details for docs_anonymizer-0.8.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| docs_anonymizer-0.8.2-py3-none-any.whl | Python 3 | none | any | Details for docs_anonymizer-0.8.2-py3-none-any.whl |
Total release size: 2.4 MB
Release files / docs_anonymizer-0.8.2.tar.gz
| Download URL | docs_anonymizer-0.8.2.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5ab25fa6c5e81e500b283443f4d13a4751434e5cf91d1c95a0201e043223e17
|
|
BLAKE2b-256 checksum How to use checksums |
4834b615f9f2708d74289c17a66bc001ad593b6946af74ac7b6371f4f3d95c98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / docs_anonymizer-0.8.2-py3-none-any.whl
| Download URL | docs_anonymizer-0.8.2-py3-none-any.whl |
|---|---|
| Size | 577.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f81f22d7c047de695b7aa8eef230249ee3313c5f659fc773301efbcb12496262
|
|
BLAKE2b-256 checksum How to use checksums |
1315d15152db79718890e6a33f3eef60538c8812b3794bd8346b7dd0cd8c08fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for docs-anonymizer 0.8.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.