Automated Redaction for Node.js
Open-source PII detection and redaction library for Node.js. 500+ tested regex patterns, GDPR/HIPAA compliant. Easy npm integration.
Full pipeline guide: PII redaction
Easy npm Integration
Install with a single command. Works with Express, Fastify, NestJS, and any Node.js framework.
npm install openredactionFast & Deterministic
Regex-first detection runs entirely locally. No external API calls, no latency. Process thousands of documents per second.
Simple API
Create an OpenRedaction instance and call detect() (async). Works in Express, Fastify, NestJS, and plain Node.
import { OpenRedaction } from "openredaction";
const redactor = new OpenRedaction({
preset: "gdpr",
redactionMode: "placeholder",
});
const result = await redactor.detect(text);
console.log(result.redacted);Privacy-First
All processing happens locally. No data leaves your infrastructure. No external API calls.
Express middleware
Scrub request bodies at the gateway so every route inherits the same policy:
import express from "express";
import { openredactionMiddleware } from "@openredaction/express";
const app = express();
app.use(express.json());
app.use(openredactionMiddleware({ autoRedact: true }));Need LLM gateways, RAG, logs, and citations? See the PII redaction guide.
Use Cases for Node.js Redaction
Get Started with Node.js Redaction
Start redacting PII in your Node.js applications in minutes. The open-source library is free and works entirely offline.