Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Sanitizr — AI-Safe Data SanitizationNew to Visual Studio Code? Get it now.
Sanitizr — AI-Safe Data Sanitization

Sanitizr — AI-Safe Data Sanitization

sanitizr

|
1 install
| (0) | Free
Detect 60+ secret patterns and replace with realistic fake values. Share code safely with ChatGPT, Claude, Gemini without exposing PII, API keys, or credentials.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Sanitizr — AI-Safe Data Sanitization for VS Code

Detect 60+ secret patterns and replace with realistic fake values. Share code safely with ChatGPT, Claude, Gemini, and Cursor without exposing PII, API keys, or credentials.

Why Sanitizr?

When you copy code to AI assistants, you risk exposing:

  • 🔑 API keys (OpenAI, AWS, GitHub, Stripe, Twilio...)
  • 🔒 Database passwords and connection strings
  • 📧 Email addresses and phone numbers
  • 🏠 Internal hostnames and staging URLs
  • 💳 Credit cards, SSNs, and other PII

Sanitizr automatically detects and replaces these with realistic fake values — so your sanitized output still looks like real data (great for debugging, sharing examples, or testing).

How It Works

Sanitizr runs silently in the background. The moment you copy text containing a secret, it replaces sensitive values with realistic fakes:

# You copy:
DATABASE_URL=postgres://admin:SuperSecret123@prod-db.company.internal:5432/app
API_KEY=sk-proj-1234567890abcdefghij

# Sanitizr replaces with realistic fakes:
DATABASE_URL=postgres://user:SafePass704!@db.corp5116.internal:5432/app  
API_KEY=sk_RJMHoWtV02k594zuNfQ8

Key difference: Other tools replace with [REDACTED] — Sanitizr generates realistic replacements that preserve format and look authentic.

What Gets Detected

Category Examples
Cloud Credentials AWS, GCP, Azure, DigitalOcean, Heroku, Vercel
AI Service Keys OpenAI, Anthropic, HuggingFace, Cohere
Payment APIs Stripe, PayPal, Square, Razorpay
Database Secrets MongoDB, PostgreSQL, Redis, MySQL connection strings
Communication Slack, Discord, Telegram, Twilio, SendGrid
Personal Info SSN, Credit Cards, Phone Numbers, Emails
Crypto Private Keys, Seed Phrases, Exchange API Keys
Infrastructure Internal hostnames, staging URLs, IPv4/IPv6
Generic Secrets Passwords, API Keys, Tokens, JWTs, PEM keys

Features

Feature Sanitizr Other Tools
Detection patterns 60+ <20
Realistic fake values ✅ ❌ [REDACTED]
Deterministic output ✅ Same input = same output ❌ Random
Zero config required ✅ ⚠️
No API keys needed ✅ ❌ Some require auth
Works with Cursor IDE ✅ ⚠️

Core Features

  • 🛡️ Auto-sanitizes clipboard every 500ms while VS Code is focused
  • ✂️ Sanitize selection — highlight text in the editor, run the command
  • 🔔 Status bar indicator — see at a glance if Sanitizr is active
  • ⚡ Zero external network calls — 100% local, engine runs entirely in the extension
  • 🎯 Deterministic replacements — same input always produces same safe output

Commands

Command Description
Sanitizr: Sanitize Clipboard Manually trigger clipboard sanitization
Sanitizr: Sanitize Selection Redact secrets in the current editor selection (in-place)
Sanitizr: Toggle Auto-Sanitize Turn automatic clipboard monitoring on or off

Settings

Setting Default Description
sanitizr.autoSanitize true Automatically sanitize clipboard on change
sanitizr.notify true Flash status bar when content is redacted
sanitizr.onlyWhenFocused true Only monitor clipboard when VS Code window is focused

Use Cases

🤖 Share Code with AI Assistants

Before copying error logs or configs to ChatGPT/Claude, Sanitizr removes real credentials and replaces them with realistic fakes.

🧪 Generate Test Data

Turn production configs into safe test data by running through Sanitizr — output looks authentic but contains no real secrets.

📺 Safe Screen Sharing

Present code confidently knowing Sanitizr has replaced sensitive values with realistic placeholders.

📋 Team Collaboration

Share config examples without manually redacting secrets — Sanitizr handles it automatically.

Privacy & Security

  • ✅ 100% Local Processing — All detection happens on your machine
  • ✅ No Data Sent Anywhere — Zero network calls, no telemetry
  • ✅ No API Keys Required — Works offline, no accounts needed
  • ✅ Open Source Engine — Audit the code yourself

Multi-Platform

Sanitizr runs everywhere:

  • VS Code Extension (you're here!)
  • Cursor IDE — Works seamlessly!
  • CLI — npm install -g sanitizr → cat secrets.env | sanitizr
  • Node.js Library — const { sanitize } = require('sanitizr')
  • Browser UI — sanitizr.nl

Comparison with Alternatives

Feature Sanitizr SanitizeAI dotenv-sanitize Mask
Patterns 60+ 299+ ~10 Manual
Realistic output ✅ ❌ ❌ ❌
Free & unlimited ✅ 100/month ✅ ✅
No auth required ✅ ❌ ✅ ✅
Any file type ✅ ✅ .env only ✅
Deterministic ✅ ❌ ❌ ❌
CLI + npm ✅ ❌ ❌ ❌

Installation

  1. Open VS Code or Cursor
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Sanitizr"
  4. Click Install

Or install via command line:

code --install-extension collinsk.sanitizr

Links

  • 🏠 Website
  • 📦 npm Package
  • 🐙 GitHub Repository
  • 🐛 Report Issues

License

MIT License — free for personal and commercial use.


Made with ❤️ for developers who care about privacy.

Share code safely. Keep secrets secret.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft