Strip emails, SSNs, and credit cards before they hit OpenAI. One npm install. Zero dependencies. <1ms per call.
You're shipping AI features, but your team is nervous. "What if a user's SSN or email gets logged by OpenAI? What about SOC 2? What about HIPAA?" You can't send sensitive user data to third-party APIs, but you can't not ship AI.
RedactPII is your safety net. It's a zero-dependency, blazing-fast module that finds and strips sensitive data before it ever leaves your server.
Basic usage - no setup required
// 1. Install
import { Redactor } from '@redactpii/node';
// 2. Redact
const redactor = new Redactor();
const clean = redactor.redact(
'Hi David Johnson, call 555-555-5555'
);
// Result: "Hi PERSON_NAME, call PHONE_NUMBER"Audit dashboard coming soon - add your API key for compliance trails
// 1. Add your API Key
const redactor = new Redactor({
apiKey: process.env.REDACTPII_API_KEY,
rules: { EMAIL: true, SSN: true },
});
// 2. Redact and... done.
const clean = redactor.redact(
'User john@acme.com SSN is 123-45-6789'
);
// Result: "User EMAIL_ADDRESS SSN is..."
// 🔒 Dashboard (coming soon) will have audit logThe module never sends PII to our servers. Only anonymized metadata for audit logs. Your data never leaves your infrastructure.
Built for production. <1ms per operation and zero external dependencies. Pure, modern TypeScript.
Protect data before it hits OpenAI, Anthropic, or LangChain. Copy-paste examples to secure your LLM features in minutes.
When your first enterprise customer sends their "Security Questionnaire," you'll be ready. Immutable audit trails included.
For developers and solo projects.
For teams, compliance, and enterprise.
Install the free module and get your first redaction running in 60 seconds.