Skip to content

Eulex0x/cleanmyprompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Clean My Prompt πŸ”’

Privacy-First AI Prompt Sanitizer - Remove Sensitive Data Before Sharing

License: MIT Client-Side Privacy

🌐 Live Demo: CleanMyPrompt.com


πŸš€ What is Clean My Prompt?

Clean My Prompt is a 100% client-side web tool that sanitizes sensitive data from text before you share it with AI assistants like ChatGPT, Claude, or Gemini. It detects and replaces emails, API keys, passwords, credit cards, phone numbers, IP addresses, names, and moreβ€”all in your browser's memory.

✨ Key Features

  • πŸ” 100% Offline Processing - Zero network requests after page load
  • 🧠 Smart NLP Detection - Uses Compromise.js to detect names, places, companies
  • 🌍 International Support - Handles US, EU, and German data formats
  • ⚑ Real-Time Sanitization - Updates as you type
  • 🎨 Two Modes - Placeholder mode ([EMAIL_1]) or Realistic mode ([email protected])
  • πŸ”§ Custom Patterns - Add your own regex patterns for domain-specific data
  • 🎯 15+ Detection Patterns - Emails, URLs, IPs (v4/v6), phones, credit cards, IBANs, API keys, credentials
  • πŸ“– Open Source (MIT) - Fully auditable, fork-friendly

🎯 Why Use This?

The Problem

Developers and professionals accidentally leak sensitive data when using AI assistants:

  • πŸ”‘ API keys and secrets in debugging prompts
  • πŸ“§ Customer emails in support tickets
  • πŸ’³ Credit card numbers in payment troubleshooting
  • 🏒 Real names and locations in document drafts
  • 🌐 Server IPs and database credentials

The Solution

One-click sanitization that works entirely in your browser. No trust requiredβ€”verify in DevTools that zero network requests are made.


πŸ› οΈ How It Works

  1. Paste your text containing sensitive data
  2. Watch real-time sanitization (no button needed!)
  3. Copy the cleaned output to clipboard
  4. Share safely with AI assistants

Technical Architecture

User Input β†’ Browser RAM β†’ NLP Analysis β†’ Regex Matching β†’ Sanitized Output
                ↓
         No Network I/O
         No Server Storage
         No Data Persistence

Detection Pipeline:

  1. NLP First: Compromise.js detects people, places, organizations
  2. Regex Second: 15+ patterns catch structured data (emails, IPs, keys, etc.)
  3. Instant Output: Sanitized text generated in milliseconds

πŸ“¦ What Gets Detected?

Category Examples Formats
πŸ“§ Emails [email protected], [email protected] Universal
πŸ“ž Phones (555) 123-4567, +49 176 1234567, 0176265124 US, EU, DE
πŸ”‘ API Keys sk_live_abc..., AKIAIOSFODNN7..., ghp_xyz... AWS, GitHub, Stripe, generic
🌐 IPs 192.168.1.1, 2001:0db8:85a3::8a2e:0370:7334 IPv4, IPv6
πŸ’³ Credit Cards 4532-1234-5678-9010, 5425 2334 3010 9903 Universal
🏦 IBANs DE89370400440532013000, FR14 2004... EU
πŸ” Credentials password: abc123, username: admin Universal
πŸ”— URLs https://api.example.com, www.site.com Universal
πŸ‘€ Names John Smith, Dr. Emily Chen (NLP) Universal
🏒 Companies Microsoft, Apple Inc. (NLP) Universal
πŸ“ Locations Seattle, Berlin, Munich (NLP) Universal

πŸ–₯️ Installation & Usage

Option 1: Use Online (Recommended)

Visit CleanMyPrompt.com - works immediately in any modern browser.

Option 2: Run Locally

# Clone the repository
git clone https://github.com/Eulex0x/cleanmyprompt.git
cd cleanmyprompt

# Open in browser
open index.html  # macOS
start index.html # Windows
xdg-open index.html # Linux

No build process, no dependencies, no installation required!

Option 3: Host Your Own

Upload all files to any static hosting:

  • GitHub Pages
  • Netlify
  • Vercel
  • AWS S3 + CloudFront
  • Your own web server

πŸ”’ Privacy & Security

What We DON'T Collect

  • ❌ Your prompts or sanitized text
  • ❌ Personally identifiable information
  • ❌ IP addresses
  • ❌ User accounts
  • ❌ Behavioral data
  • ❌ Tracking cookies

What We DO Collect

  • βœ… Minimal anonymous analytics (country-level aggregates only)
  • βœ… Page views (not who viewed them)

Verification

  1. Open browser DevTools (F12)
  2. Go to Network tab
  3. Paste sensitive text and sanitize
  4. Observe: Zero requests after initial page load

Offline Test: Disconnect from the internetβ€”the tool still works perfectly!


🌍 International Support

  • πŸ‡ΊπŸ‡Έ United States: US phone formats, ZIP codes
  • πŸ‡©πŸ‡ͺ Germany: German phones (0176...), IBANs, postal codes
  • πŸ‡ͺπŸ‡Ί European Union: IBAN validation, EU phone formats, GDPR compliance
  • πŸ‡¬πŸ‡§ United Kingdom: UK phones, postal codes

Missing your region? Open an issue or submit a PR!


πŸ§ͺ Demo Data

Click "Try Demo" button in the app to load a comprehensive benchmark with 60+ test cases including:

  • US & European phone numbers
  • AWS, GitHub, and Stripe API keys
  • IPv4 and IPv6 addresses
  • Credit cards and IBANs
  • Names, companies, and locations

πŸ›£οΈ Roadmap

  • Browser extension (Chrome, Firefox)
  • CLI tool for terminal workflows
  • Mobile PWA
  • Import/export custom pattern libraries
  • Advanced NLP models
  • Multi-language UI

🀝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Before submitting:

  • Test locally in multiple browsers
  • Ensure no network requests during sanitization
  • Update documentation if needed

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

TL;DR: Use freely, commercially or personally. Attribution appreciated but not required.


πŸ™ Credits

  • Compromise.js - Client-side NLP
  • Tailwind CSS - Utility-first CSS framework
  • Privacy advocates - For pushing user-first design

πŸ“ž Support


βš–οΈ Legal


Made with ❀️ and respect for privacy

Website β€’ Technical Details β€’ About

⭐ Star this repo if it helps keep your data safe!

Contributors

Languages