“We added it in front of our prototype assistant so support emails get masked before prompts go out.”
Jordan P.
Small product team
Run it locally. No API calls. No data leaves your system.
Need PII redaction?
Compare open source AI redaction tools.
Before OpenAI calls, see redact pii before openai.
Built-in redaction for common sensitive fields.
Large default pattern set out of the box.
Add project-specific rules when needed.
No API calls. No external processing.
Same input, same output every time.
Light enough for request-time redaction.
Clean text before it spreads downstream.
No external dependencies to pull in.
import { redact } from "openredaction";
const input = "helpdesk reply: reach me at alice@company.com, mobile 555-123-4567";
const { redactedText } = redact(input);
console.log(redactedText);
// helpdesk reply: reach me at [REDACTED], mobile [REDACTED]Install it, import it, and redact before you send anything to an API.
import { redact } from "openredaction";
const text = "ticket: user said call me on 555-0199 after lunch";
const { redactedText } = redact(text);
console.log(redactedText);“We added it in front of our prototype assistant so support emails get masked before prompts go out.”
Jordan P.
Small product team
“Not perfect for every edge case, but it gives us a practical baseline for sanitizing logs in Node.”
Maya R.
Indie SaaS
“We use it in staging and early production paths to reduce accidental PII leakage while we tune rules.”
Chris L.
Internal tooling
“The open-source approach made it easy to audit what is being redacted before we ship wider.”
Nina K.
Security-minded startup
“We added it in front of our prototype assistant so support emails get masked before prompts go out.”
Jordan P.
Small product team
“Not perfect for every edge case, but it gives us a practical baseline for sanitizing logs in Node.”
Maya R.
Indie SaaS
“We use it in staging and early production paths to reduce accidental PII leakage while we tune rules.”
Chris L.
Internal tooling
“The open-source approach made it easy to audit what is being redacted before we ship wider.”
Nina K.
Security-minded startup
Use case: prevent leaking PII to AI APIs
Keep pasted emails, callback numbers, card details, and account references out of prompts and logs.
Coming soon
Working on simple wrappers for common use cases:

OpenAI
OpenAI wrapper
Redact sensitive data from prompts before sending requests to OpenAI. Prevent emails, names, and other PII from leaving your application while keeping the same API usage pattern.

Express.js
Express middleware
Sanitise incoming request data automatically before it reaches your application logic. Helps prevent sensitive user information from being logged, stored, or forwarded.

Logging
Logging integrations
Redact sensitive fields before writing logs to tools like Pino or Winston. Avoid storing emails, phone numbers, and personal data while keeping logs.

Webhook
Webhook safety
Redact data before sending outbound requests to third-party like Slack or Zapier.
“OpenRedaction gave us a practical, inspectable first layer for masking obvious PII before prompts and logs.”
Samir Q.
Maintainer, internal AI tooling
Alternatives
A simple Node.js option if you want local redaction, plus common managed and Python-based alternatives.
| Tool | Type | Runtime | Processing | Detection | Best fit |
|---|---|---|---|---|---|
| OpenRedaction | Open source | Node.js | Local or self-hosted | Deterministic regex | Teams wanting predictable redaction in JS stacks |
| AWS Comprehend | Managed | Managed AWS service | External cloud processing | ML-based entity detection | AWS-native pipelines |
| Microsoft Presidio | Open source | Python | Self-hosted | NLP + regex | Python teams with custom NLP needs |
| Google DLP | Managed | Managed GCP service | External cloud processing | ML + infoTypes | GCP-centric compliance workflows |
Get started
Install it, drop it into your request path, and clean prompts, logs, or stored text before it leaves your system.