Zero-Trust Data Protection

PrivacyScrubber SDK: Embed Local PII Masking

Build Privacy-First AI Apps with Zero-Trust Data Masking

100% Local Processing
Trusted by 10,000+ professionals · $0 Free / $99/mo Teams
Airplane Mode Verified
Local Execution

AI Summary / Key Takeaways

Verified Zero-Trust Logic

"Bring our high-performance, client-side PII detection engine directly into your own applications. The PrivacyScrubber SDK allows you to scrub sensitive data within your own web apps or Node.js backends with zero external network dependencies."

What environments does the SDK support?
Does the SDK require an API key to function?
How large is the SDK bundle?

Enterprise-Grade AI Privacy

Add custom redaction rules and priority support with PRO.

GO PRO

Why Legacy DLP Fails AI Workflows

Building an AI wrapper or SaaS product often means sending raw user data to OpenAI or Anthropic APIs, turning you into a high-risk Data Processor. Implementing custom regex masking is brittle, misses context-dependent entities like names, and creates significant technical debt.

How to Mask PII in Local Memory

1

Install via npm

Add the SDK to your project using npm or yarn. It works universally across modern browsers (ES Modules) and Node.js environments.

2

Initialize Engine

Import the scanner and load your desired detection profiles (e.g., General, Healthcare, Finance) natively in your application state.

3

Scrub & Reveal API

Call the .scrub() method before making outgoing LLM requests, and .reveal() to re-hydrate the AI response seamlessly.

What Teams Achieve with Local PII Masking

"Integrating the SDK took less than an hour. Now our React frontend masks patient PHI before the GraphQL request even hits our backend. Huge win for HIPAA compliance."

J

James C., CTO at HealthTech Startup

Verified User

"I used the SDK to build a local desktop app using Electron. The WASM regex engine is ridiculously fast and the fact that it doesn't need to call home makes it perfect for offline-first apps."

A

Aisha L., Independent Developer

Verified User

Why Adopt the PrivacyScrubber SDK?

When you integrate the PrivacyScrubber SDK into your application, you instantly offload the liability of handling raw Personal Identifiable Information (PII) before it hits your backend or third-party AI APIs. By running the sanitization client-side, you achieve true Privacy by Design.

Developer-First Integration

We built the SDK with an intuitive, synchronous API that seamlessly fits into your existing data flow. Whether you are building an AI chatbot in React or processing massive CSV logs in Node.js, the implementation takes minutes, not weeks.

integration.js
import { PrivacyScrubber } from '@privacyscrubber/sdk'; // Initialize with a specific compliance profile
const scrubber = new PrivacyScrubber({ profile: 'legal', customRules: [{ type: 'CASE_ID', pattern: /CASE-\d{4}/g }]
}); // Intercept user input before LLM dispatch
const userInput = "Review CASE-8821 for John Doe.";
const { cleanText, sessionMap } = scrubber.scrub(userInput); // cleanText: "Review [CASE_ID_1] for [NAME_1]."
const aiResponse = await fetch('/api/llm', { body: cleanText }); // Re-hydrate the response for the user
const finalOutput = scrubber.reveal(aiResponse, sessionMap);

Enterprise-Grade Performance

Speed is critical when intercepting user input. Our hybrid NLP+Regex engine is optimized to run on the main thread or within Web Workers with near-zero latency. Scrubbing a typical 5,000-word document takes less than 15 milliseconds on a modern mobile device, ensuring your application remains highly responsive.

Licensing & Source Code Access

The SDK is delivered as part of the PrivacyScrubber Enterprise tier. This includes full access to the un-obfuscated source code, allowing your internal Security and DevOps teams to audit every line of cryptography and regex logic before deploying it to your production environments.

Feature Reliability & Audit

This enterprise feature is powered by our Local-First Sanitization Engine. Unlike legacy cloud DLP tools, PrivacyScrubber processes your PrivacyScrubber SDK: Embed Local PII Masking logic 100% within your browser's V8 sandbox. This architectural decision ensures that even the most complex detection patterns never expose raw data to an external API.

WASM 1.2 Audited
Zero-Trace RAM Session

Airplane Mode

Verified feature operational integrity without network connectivity.

Step-by-Step Guide

How to use this feature

5 min total
1

Install Package

Run 'npm install @privacyscrubber/sdk' in your terminal.

2

Import SDK

import { PrivacyScrubber } from '@privacyscrubber/sdk';

3

Instantiate

const scrubber = new PrivacyScrubber({ profile: 'general' });

4

Sanitize Data

const { cleanText, sessionMap } = scrubber.scrub(userInput);

What you need: Node.js environment NPM or Yarn package manager

Frequently Asked Questions

What environments does the SDK support?

The PrivacyScrubber SDK is built as an isomorphic library. It runs securely in the browser (React, Vue, Vanilla JS, Web Workers), in Node.js backends, and inside Electron/Tauri desktop wrappers.

Does the SDK require an API key to function?

No. The SDK operates in a completely air-gapped manner. There are no API keys, no telemetry, and no network requests made by the library. You must possess a valid Enterprise License to use the SDK in commercial production environments, but the library itself has zero DRM phoning home.

How large is the SDK bundle?

The core NLP and regex engine is heavily optimized. The minified, gzipped bundle size is approximately ~180KB for the general profile. Heavy industry-specific dictionaries (e.g., medical terminologies) can be lazy-loaded on demand to preserve fast Time-to-Interactive (TTI).

How does pricing work for the SDK?

The SDK is available across three tiers: PRO ($15/mo) for solo developers building personal scripts, TEAMS ($99/mo) for unlimited CI/CD pipeline volume across your startup's backend servers, and ENTERPRISE (Custom) for full source code access and air-gapped deployment.

Protect Your Team's AI Prompts in Under 30 Seconds

Protect My Team

No server uploads. Works 100% offline in browser RAM.

Support