presidio-anonymizer
Presidio Anonymizer package - replaces analyzed text with desired values.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a concrete problem in data privacy workflows. It's most useful when paired with a PII detector (like presidio-analyzer), but the anonymization logic itself is solid and well-documented. Install if you need to transform detected PII in text after detection.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires analyzer results (entity spans and types) as input—typically from presidio-analyzer or another PII detection tool.
- Low friction install with a single runtime dependency (cryptography).
- Active maintenance with a recent release 23 days ago and 10484 repository stars.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
last release 2026-07-22 (23 days) · last repo commit 2026-08-11 · 10,484 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,936,435 downloads/mo, #2,194 on PyPI
Alternatives
Verify before relying
pip install presidio-anonymizer
from presidio_anonymizer import AnonymizerEngine
from presidio_anonymizer.entities import RecognizerResult, OperatorConfig
engine = AnonymizerEngine()
result = engine.anonymize(
text="My name is Bond, James Bond",
analyzer_results=[RecognizerResult(entity_type="PERSON", start=11, end=15, score=0.8)],
operators={"PERSON": OperatorConfig("replace", {"new_value": "REDACTED"})}
)- Performance characteristics with large text volumes or many overlapping entities
- Compatibility with custom analyzer output formats beyond RecognizerResult
- Whether AHDS Surrogate operator is production-ready or experimental
What it is and what it does
Presidio Anonymizer is a Python module that takes detected PII entities and replaces them with anonymized values according to configured operators. It handles the transformation side of PII protection: given a text and a list of entity locations (typically from a separate analyzer), it applies anonymization strategies like redaction, masking, hashing, encryption, or custom transformations. The package also includes a deanonymizer for reversing encryption-based anonymization.
The module is designed to work downstream of PII detection—you provide the text, the detected entity spans and types, and the anonymization rules you want applied. It handles overlapping entity spans by selecting based on confidence score or span containment, and supports batch operations for lists and nested dictionaries. The core anonymizers use standard algorithms (AES for encryption, SHA256/SHA512 for hashing) and rely on cryptography for secure operations.
Use it for
- Redact sensitive customer data in logs or reports before sharing with non-privileged teams
- Hash or mask credit card numbers and SSNs in datasets for analytics while preserving some structure
- Encrypt detected names and email addresses in text, then decrypt them later with the correct key
- Batch-process lists of documents to remove PII before archival or compliance export
- Replace detected phone numbers with placeholder text in call transcripts or support tickets
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a concrete problem in data privacy workflows. It's most useful when paired with a PII detector (like presidio-analyzer), but the anonymization logic itself is solid and well-documented. Install if you need to transform detected PII in text after detection.
Install
presidio-anonymizer on PyPI
Before you install
Low friction install with a single runtime dependency (cryptography). Active maintenance with a recent release 23 days ago and 10484 repository stars.
Requires analyzer results (entity spans and types) as input—typically from presidio-analyzer or another PII detection tool.
License in practice
MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install presidio-anonymizer
from presidio_anonymizer import AnonymizerEngine
from presidio_anonymizer.entities import RecognizerResult, OperatorConfig
engine = AnonymizerEngine()
result = engine.anonymize(
text="My name is Bond, James Bond",
analyzer_results=[RecognizerResult(entity_type="PERSON", start=11, end=15, score=0.8)],
operators={"PERSON": OperatorConfig("replace", {"new_value": "REDACTED"})}
)
Verify before relying
- Performance characteristics with large text volumes or many overlapping entities
- Compatibility with custom analyzer output formats beyond RecognizerResult
- Whether AHDS Surrogate operator is production-ready or experimental
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <3.15,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagecryptography |
| Maintenance | Actively maintained 23 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,936,435 / month, #2,194 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: presidio_anonymizer-2.2.364-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “PII anonymization”
- presidio-anonymizerReplaces detected PII text entities with anonymized values using…
- scrubadubDetects and replaces personally identifiable information (names,…
- presidio-image-redactorDetects and redacts personally identifiable information (PII) text in…
Give your agent the search over MCP, or paste the wish link into any chat.
More Security packages
Provides Python bindings to the FreeDesktop.org Secret Service API for securely storing and retrieving passwords and secrets through GNOME Keyring, KWallet, or KeePassXC.
MSAL for Python handles OAuth2 and OpenID Connect authentication with Microsoft identity services, managing token acquisition, caching, and refresh for applications integrating with Microsoft Entra ID, Microsoft Accounts, and Azure AD B2C.
joserfc implements JOSE standards (JWS, JWE, JWK, JWT, and related RFCs) for signing, encrypting, and managing JSON-based cryptographic tokens in Python.
Authlib provides a complete implementation of OAuth 1.0, OAuth 2.0, and OpenID Connect 1.0 for building both authentication clients and servers, with built-in support for JWS, JWK, JWA, and JWT standards.
Provides low-level CFFI bindings to the official Argon2 password hashing algorithm for use by libraries and applications that need direct access to Argon2 without higher-level abstractions.
ADAL for Python authenticates applications with Azure Active Directory to obtain tokens for accessing Azure AD-protected resources.
Install only if maintaining existing code that already depends on it, and plan a migration.
See also microsoft-security-utilities-secret-masker · presidio-analyzer · presidio-image-redactor · django-anon · argus-redact · django-cryptography-django5 · scrubadub · django-fernet-fields-v2 · django-fernet-encrypted-fields · django-cryptography