JSON Anonymizer for Visual Studio Code

**Instantly anonymize sensitive data in JSON files while preserving structure**
[](https://marketplace.visualstudio.com/items?itemName=redjamjar.json-anonymizer)
[](https://marketplace.visualstudio.com/items?itemName=redjamjar.json-anonymizer)
[](https://marketplace.visualstudio.com/items?itemName=redjamjar.json-anonymizer)
[](https://github.com/paulb79/vscode-json-anonymizer/blob/main/LICENSE)
✨ Features
Transform sensitive JSON data into anonymized versions perfect for testing, sharing, or demonstrations - all while maintaining the exact structure and data types of your original files.
🎯 Key Features
- 🔒 Instant Anonymization - One-click to anonymize any JSON file
- 🎲 Reproducible Results - Use seeds for consistent anonymization across teams
- 📝 Selective Anonymization - Anonymize only selected portions of your JSON
- 💾 Safe Operations - Create new files or backups to preserve originals
- ⚡ Lightning Fast - Pure TypeScript implementation with zero external dependencies
- 🎨 Smart Preservation - Maintains JSON structure, types, and array lengths
Demo

📥 Installation
Method 1: VSCode Marketplace
- Open VSCode
- Press
Ctrl+P / Cmd+P
- Type:
ext install redjamjar.json-anonymizer
- Click Install
Method 2: Extension View
- Open Extensions view (
Ctrl+Shift+X / Cmd+Shift+X)
- Search for "JSON Anonymizer"
- Click Install
🚀 Usage
Quick Start
- Open any
.json file
- Right-click in the editor
- Select "Anonymize JSON"
That's it! Your sensitive data is now anonymized.
Available Commands
| Command |
Description |
Shortcut |
| Anonymize JSON |
Replace current file with anonymized version |
Shift+Cmd+A (Mac)
Shift+Alt+A (Win/Linux) |
| Anonymize JSON to New File |
Create a new file with anonymized content |
Via context menu |
| Anonymize JSON with Seed |
Use a seed for reproducible anonymization |
Via command palette |
| Anonymize Selected JSON |
Anonymize only the selected portion |
Shift+Cmd+S (Mac)
Shift+Alt+S (Win/Linux) |
Access Methods
- Right-Click Menu - Available on any JSON file
- Command Palette -
Cmd+Shift+P → Type "JSON Anonymizer"
- Status Bar - Click the shield icon when editing JSON
- Keyboard Shortcuts - Customizable in VSCode settings
🎮 Examples
Before Anonymization
{
"user": {
"name": "John Doe",
"email": "john.doe@example.com",
"ssn": "123-45-6789",
"phone": "+1-555-0123"
},
"creditCard": {
"number": "4532-1234-5678-9012",
"expiry": "12/25",
"cvv": "123"
},
"transactions": [
{
"date": "2024-01-15",
"amount": 250.00,
"merchant": "Amazon"
}
]
}
After Anonymization
{
"user": {
"name": "K9xM L3Q",
"email": "b7xk.n5m2@ql9w8x.3rp",
"ssn": "847-92-3651",
"phone": "+5-219-7483"
},
"creditCard": {
"number": "9183-5672-4039-2847",
"expiry": "08/29",
"cvv": "582"
},
"transactions": [
{
"date": "3729-85-03",
"amount": 748.23,
"merchant": "Hy4K9m"
}
]
}
⚙️ Configuration
Customize the extension behavior through VSCode settings:
{
// Preserve numeric types (numbers stay as numbers)
"jsonAnonymizer.preserveTypes": true,
// Keep object keys unchanged
"jsonAnonymizer.preserveKeys": true,
// Maintain original array lengths
"jsonAnonymizer.preserveArrayLength": true,
// Create backup before anonymizing
"jsonAnonymizer.createBackup": false,
// Default seed for reproducible results (null for random)
"jsonAnonymizer.defaultSeed": null
}
🔑 Reproducible Anonymization
Need consistent anonymization across your team? Use the seed feature:
Cmd+Shift+P → "JSON: Anonymize JSON with Seed"
- Enter a seed number (e.g.,
12345)
- Share the seed with your team
- Everyone gets identical anonymized results!
Perfect for:
- Creating consistent test data
- Reproducible demos
- Team collaboration
- Debugging scenarios
🎯 Use Cases
- 🧪 Test Data Generation - Create realistic test data from production samples
- 📊 Safe Data Sharing - Share data structures without exposing sensitive information
- 🎓 Educational Demos - Show JSON processing without privacy concerns
- 🐛 Bug Reports - Include data structures in bug reports without sensitive data
- 📝 Documentation - Create example JSON files for documentation
- 🔐 GDPR Compliance - Quickly anonymize personal data for compliance
💡 Pro Tips
Selective Anonymization
Only anonymize specific sensitive fields:
- Select the sensitive portion
- Right-click → "Anonymize Selected JSON"
- Only selected data is anonymized
Batch Processing
Process multiple files quickly:
- Open each JSON file in tabs
- Use
Shift+Cmd+A on each
- All files anonymized in seconds
Safe Testing
Always test on copies first:
- Use "Anonymize to New File" for safety
- Enable "Create Backup" in settings
- Review changes before saving
🛡️ Privacy & Security
- No Data Collection - All processing happens locally
- No Network Requests - Completely offline operation
- No External Dependencies - Pure TypeScript implementation
- Open Source - Inspect the code yourself
📋 Requirements
- Visual Studio Code v1.85.0 or higher
- Works on Windows, macOS, and Linux
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature)
- Commit your changes (
git commit -m 'Add some AmazingFeature')
- Push to the branch (
git push origin feature/AmazingFeature)
- Open a Pull Request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🐛 Known Issues
- Large files (>10MB) may take a moment to process
- Complex nested structures with 10+ levels may impact performance
📮 Support
🎉 Acknowledgments
- Thanks to all contributors and users
- Inspired by the need for better data privacy tools
- Built with TypeScript and the VSCode Extension API
Made with ❤️ for the developer community
**[Install Now](https://marketplace.visualstudio.com/items?itemName=redjamjar.json-anonymizer)** | **[GitHub](https://github.com/paulb79/json-anonymizer)** | **[Report Issue](https://github.com/paulb79/json-anonymizer/issues)**