Redact PII
The Redact PII block scans a text input and replaces personally identifiable information with placeholder tokens using Microsoft Presidio.
Replace PII in text with typed placeholders
The Redact PII block scans a text input and replaces personally identifiable information with placeholder tokens using Microsoft Presidio. You specify which entity types to detect — such as PHONE_NUMBER or EMAIL_ADDRESS — and the block substitutes each match with a bracketed label of that type, leaving the surrounding text intact. The language of the input text is also configurable via a language code parameter.
The block takes three required inputs: the text to process, a language code indicating the language of that text, and an array of PII entity type strings that defines what categories of information should be redacted. The result is returned as a single output field, text, containing the modified string with all matched entities replaced. If the entities array is empty, the block returns empty text without performing any analysis.
This block fits into workflows where user-submitted or third-party text needs to be sanitized before being stored, logged, passed to an AI model, or displayed. It is commonly used in data processing pipelines, customer support tools, document handling workflows, and any scenario where sensitive personal information must be removed or masked before further processing.
What you can build
Real-world workflows powered by the Redact PII block.
Sanitize Support Tickets
Strip phone numbers, email addresses, and other PII from incoming customer support messages before routing them to AI analysis or external logging systems.
Anonymize Training Data
Remove personal identifiers from text datasets before using them as examples or context in AI model workflows.
Redact Documents Before Storage
Process uploaded documents or form submissions to replace sensitive fields with placeholders prior to saving records.
Protect User Input in Logs
Intercept and redact PII from user-submitted text before it is written to audit logs or analytics pipelines.
Mask Data in AI Prompts
Redact personal information from user messages before passing them to a language model, reducing exposure of sensitive data.
Compliance Screening Workflows
Integrate PII redaction into document review pipelines to help enforce data minimization policies across text-based content.
Ready to add Redact PII to your workflow?
Get Started FreeCommon questions about Redact PII
What parameters does the Redact PII block require?
The block requires three inputs: the text string to process, a language code (such as "en" for English), and an array of PII entity type strings specifying which categories to redact (for example, ["PHONE_NUMBER", "EMAIL_ADDRESS"]). A destination variable for storing the output is optional.
What does the block return?
The block returns a single output field called text, which contains the original input string with all detected PII entities replaced by their corresponding type placeholders, such as <PHONE_NUMBER> or <EMAIL_ADDRESS>.
What happens if I pass an empty entities array?
If the entities array is empty, the block returns empty text immediately without performing any analysis or redaction.
Which PII entity types can be redacted?
The entities parameter accepts an array of PII entity type strings. The block uses Microsoft Presidio for detection, and examples of supported types include PHONE_NUMBER and EMAIL_ADDRESS. The specific full list of supported entity types is determined by Presidio's capabilities.
What kinds of workflows is this block suited for?
This block is suited for workflows that handle user-submitted text, customer communications, document processing, or any pipeline where personal information needs to be masked before the text is stored, logged, displayed, or passed to another block such as an AI model.
Related capabilities
Detect PII
Scan text for personally identifiable information using Microsoft Presidio.
Authorize Payment
In managed payment mode, create a payment authorization. All billing events after the authorization and under the total cap will be billed to the user.
Capture Payment
Capture the currently-authorized payment
Add Redact PII to your workflow
Build powerful AI workflows with drag-and-drop blocks. No coding required.