On June 29, 2026, National Design Studio (@ndstudio) dropped a bombshell announcement that immediately resonated across the AI and privacy communities: Rampart, a compact 14.7MB machine learning model that redacts personally identifiable information (PII) directly in the browser before any data ever leaves the user’s device.

This isn’t another cloud-based filter that still requires trusting a remote server. Rampart runs entirely client-side using WebGPU, combining rule-based detection with a lightweight MiniLM model to catch both structured and contextual sensitive information. The result? Users can safely interact with AI chatbots and other services without exposing names, addresses, financial details, or other PII.
What Is Rampart and Why Was It Built?
Rampart is an open-source, on-device personal information filtering system created by National Design Studio (ndstudio.gov), a team focused on modernizing digital interfaces that serve everyday citizens. The project was built because traditional PII redaction solutions fall short in the age of generative AI:
- Remote processing risk: Most “privacy” filters still send data to remote servers for processing.
- Impractical model sizes: Large models (some over 2GB) are impractical for browser use.
- No verifiable guarantee: Users have no way to confirm their sensitive prompts aren’t being logged or exposed.
“The only personal information you can be sure is private is the information that never leaves your device.” Rampart acts as a first line of defense for anyone pasting information into AI chat interfaces, internal tools, or web applications.
How Rampart On-Device PII Redaction Works
Rampart uses a smart hybrid architecture that runs entirely locally:
Deterministic Layer (Regex + Validation)
Catches structured PII with high precision: Social Security numbers, credit card numbers, phone numbers, emails, IP addresses, routing and account numbers, government IDs, and more.
Machine Learning Layer (MiniLM-based)
A tiny ~14.7 MB model (including tokenizer) detects contextual PII that regex alone misses, such as personal names, street addresses, or other narrative details.
All processing happens in the browser via WebGPU. No data is sent anywhere until it has been cleaned.
Example Flow
Input: “My name is John Wick. I live at 88 Cedar Lane, Brookvale, CT 06482. My SSN is 123-45-6789.”
Output (redacted): “My name is [GIVEN_NAME_1]. I live at [BUILDING_NUMBER_1] [STREET_NAME_1], Brookvale, CT 06482. My SSN is [SSN_1].”
The system uses stable placeholder tokens so the downstream AI (Grok, Claude, GPT, etc.) can still understand context and respond intelligently. A reveal() function lets you optionally restore the original values in the AI’s reply if needed for the user experience.
Impressive Benchmarks & Technical Specs
Rampart punches far above its weight class:
| Model | Size | Recall (7 languages) | Notes |
|---|---|---|---|
| Rampart (Regex + MiniLM) | 14.7 MB | 98.42% | On-device, WebGPU |
| OpenAI Privacy Filter | ~2.8 GB | 97.4% | Cloud-based |
| GLiNER small v2.1 | ~600 MB | 94.2% | Larger & slower |
| Community BERT-small PII | ~29 MB | 81.5% | Lower accuracy |
| Microsoft Presidio | ~13 MB | 65% | Rule-heavy |
p50 latency on WebGPU
- Training data: AI4Privacy’s OpenPII 1.5M dataset plus synthetic chat-style data.
- Language support: English, Spanish, French, German, Italian, Portuguese, and Dutch (Latin-script languages).
- Open source: Clean TypeScript/JavaScript library.
These numbers make Rampart one of the most practical production-ready on-device privacy tools available today.
Real-World Use Cases for Rampart AI
Consumer AI Chatbots
Safely use tools like Grok, ChatGPT, or Claude without accidentally leaking personal or client data.
Enterprise & Government Applications
Agencies and contractors handling sensitive citizen or business information can add a strong client-side protection layer.
Web & SaaS Products
Embed Rampart into customer-facing AI features like support chat, document analysis, and personalization engines.
Internal Tools & Developer Workflows
Redact logs, prompts, or datasets before they reach any LLM or analytics platform.
Compliance & Risk Reduction: Helps support GDPR, CCPA, and general data minimization principles.
How to Get Started with Rampart
- Hugging Face Model: Available at huggingface.co/nationaldesignstudio/rampart
- NPM / TypeScript Library (recommended for web apps): Install with
npm install @nationaldesignstudio/rampart
Basic usage example:
import { createGuard } from "@nationaldesignstudio/rampart";
const guard = await createGuard();
const safePrompt = await guard.protect(
"My name is John Wick. I live at 88 Cedar Lane, Brookvale, CT 06482."
);
console.log(safePrompt.text);
// → "My name is [GIVEN_NAME_1]. I live at [BUILDING_NUMBER_1] [STREET_NAME_1], Brookvale, CT 06482."
const aiReply = await yourLLM(safePrompt.text);
const finalReply = guard.reveal(aiReply);Full whitepaper and benchmarks: inference.ndstudio.gov/rampart/whitepaper.pdf
Rampart is explicitly positioned as a first-generation tool and strong first line of defense, not a complete enterprise PII governance platform. It’s primarily suited to Latin-script languages, works best as one layer in a broader defense-in-depth strategy, and ongoing improvements are expected from the National Design Studio team.
Why Rampart Matters for the Future of AI Privacy
As AI becomes embedded in everyday web experiences, the volume of sensitive information flowing into prompts will only grow. Server-side redaction still requires trust. On-device solutions like Rampart shift the paradigm toward privacy by design that users and developers can actually verify and control.
This release is especially notable because it comes from a team explicitly focused on building technology that serves American citizens with elegance and utility.
Implementing On-Device Privacy in Your Web & AI Projects
Technologies like Rampart open exciting possibilities for privacy-respecting AI features. Whether you’re a developer building the next generation of web applications, a business leader concerned about data exposure, or a government contractor needing robust client-side protections, the ability to redact PII locally before it touches any cloud service is a significant advantage.
On-device privacy matters for more than text. The viral nostalgia-photo trend we cover in Younger Self AI Photos and the voice cloning tools discussed in AI Voice Cloning and AI Music Generators both raise similar questions about what happens to your data once it leaves your device.
Your growth is the mission.
At W.D. Morgan Solutions, we help organizations build secure, modern web experiences and AI integrations, from custom WordPress solutions and privacy-focused web apps to AI-powered tools that prioritize data protection. If you’re exploring how on-device redaction, browser-based ML, or similar privacy technologies can strengthen your digital products or client work, our team is ready to help.

























