Skip to main content

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, pdf with text layer, scanned PDF, hybrid PDF, txt, md, csv, html, and rtf (anonymized copy is delivered as docx)
  • 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.1 in 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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docs-anonymizer 0.8.1
File Size Uploaded
docs_anonymizer-0.8.1.tar.gz 1.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for docs-anonymizer 0.8.1
File Interpreter ABI Platform
docs_anonymizer-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 2.3 MB

Release files / docs_anonymizer-0.8.1.tar.gz

Download URL docs_anonymizer-0.8.1.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
77a22ce0d27f8852b788b66fec27797626074d6ead5efebda707d627b87a89b4
BLAKE2b-256 checksum
How to use checksums
f7c4a1b8c1ca7101ee42be2eb98cbd7c8b442b7eee313da0de844be4edf67a78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / docs_anonymizer-0.8.1-py3-none-any.whl

Download URL docs_anonymizer-0.8.1-py3-none-any.whl
Size 548.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a787bd2b9443a26b47c130097b361f790a3951fa3b4f0b8d4e239a1203488835
BLAKE2b-256 checksum
How to use checksums
737f1e353787aa4a1342d98469989e156f5a18dc118e88ff109ec54b8df113eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.30

2 release files

0.2.29

2 release files

0.2.28

2 release files

0.2.22

2 release files

0.2.21

2 release files

0.2.20

2 release files

0.2.19

2 release files

0.2.18

2 release files

0.2.17

2 release files

0.2.16

2 release files

0.2.15

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page