Presidio

Open-source PII detection and anonymization for text, images and structured data — community-governed, originally created at Microsoft

Presidio is an open-source SDK for finding and de-identifying sensitive data (PII). It was originally created at Microsoft and is now an independent, community-governed project under the Data Privacy Stack GitHub organization; it is still MIT-licensed, and old microsoft/presidio links redirect to the new home. It has four modules: Analyzer (detects PII in text), Anonymizer (replace, mask, redact or encrypt detected entities, with reversible decryption), Image Redactor (OCR-based redaction, including DICOM medical images) and Structured (tabular and semi-structured data). Detection combines NER models (spaCy, Stanza, transformers), regex, rule-based logic, checksums and surrounding context, works across multiple languages and can call external models such as GLiNER. It runs from Python or PySpark, as Docker containers (now published on GitHub Container Registry) or on Kubernetes. In LLM pipelines it is commonly used to mask prompts before they reach a model, for example through the LiteLLM proxy PII-masking guardrail, NeMo Guardrails sensitive-data rails or the Guardrails AI detect_pii validator. The docs warn that automated detection can miss PII, so treat it as one protective layer, not a guarantee. Best for: teams that must strip or mask personal data before logging, model training, RAG indexing or sending prompts to third-party LLMs. Works well with: NeMo Guardrails · LiteLLM · Guardrails AI

When to use

  • Masking PII in prompts before they reach a third-party LLM, e.g. behind a LiteLLM proxy
  • De-identifying text, tables or images before logging, model training or RAG indexing
  • Building custom recognizers for domain- or country-specific identifiers in multiple languages

When not to use

  • You need guaranteed, complete PII removal — the docs warn automated detection can miss entities
  • PII in audio or video (coverage is text, images including DICOM, and structured data)
  • Simple fixed-format masking that a few regular expressions already handle

At a glance

Pricing
Free
Deployment
Self-hosted
Difficulty
Intermediate
License
MIT
Languages
python
Use cases
pii detection, data anonymization, privacy preprocessing, llm preprocessing
Last verified
2026-10-30 (official documentation)

Works well with

Alternatives in this category

See all 4 tools in Security & Guardrails – Protecting AI Applications →

Sources

v7.0