Skip to main content

Overview

mask() takes text and a list of PII findings, and returns the text with each finding replaced according to your chosen strategy.

Basic usage


Strategies


One-liner

Use redact_for_llm() to detect and mask in a single call — optimized for LLM input preparation:
See redact_for_llm for full details.