A privacy-focused Chrome extension for validating, formatting, and beautifying JSON with syntax highlighting. All processing happens locally in your browser - no data is ever sent to external servers.
- 🎨 Beautify - Format JSON with proper indentation and syntax highlighting
- ⚡ Minify - Remove all whitespace to compress JSON
- ✓ Validate - Check if your JSON is valid with detailed error messages
- 📋 Copy - One-click copy to clipboard
- 🎯 Syntax Highlighting - Beautiful color-coded JSON display
- 💾 Auto-Save - Optional local storage for convenience (with your consent)
- 🔒 Privacy-First - 100% local processing, zero external requests
- ⚙️ Settings - Customize auto-save preferences
The extension will be available in the Chrome Web Store shortly.
-
Download or clone this repository:
git clone https://github.com/zoibana/jsonbarber.git
-
Open Chrome and navigate to
chrome://extensions/ -
Enable Developer mode (toggle in the top-right corner)
-
Click Load unpacked
-
Select the
jsonbarberfolder -
The JsonBarber icon should appear in your extensions toolbar
- Click the JsonBarber icon in your Chrome toolbar
- A new tab will open with the JSON editor
- Paste your JSON into the Input panel
- Click:
- Validate to check if JSON is valid
- Beautify to format with indentation
- Minify to compress by removing whitespace
- Copy to copy the output to clipboard
- Clear to reset both panels
Ctrl/Cmd + Enter- Beautify JSONCtrl/Cmd + K- Clear both fieldsCtrl/Cmd + Shift + C- Copy output
JsonBarber is designed with privacy as the top priority:
- ✅ 100% Local Processing - All JSON operations happen in your browser
- ✅ Zero Network Requests - No data is ever sent to external servers
- ✅ No Analytics or Tracking - We don't collect any usage data
- ✅ No Permissions Required - The extension requests zero Chrome permissions
- ✅ Open Source - Full transparency - audit the code yourself
- ✅ Optional Auto-Save - Only stores data locally with your explicit consent
On first use, JsonBarber will ask if you want to enable auto-save:
- Enable Auto-Save - Automatically saves your JSON input/output to browser's local storage for convenience
- No Thanks - Disables auto-save for maximum privacy
You can change this setting anytime in the Settings panel (⚙️).
Read our full Privacy Policy
- Input Size Validation - Maximum 25 MB to prevent browser freezes
- Nesting Depth Check - Prevents stack overflow on deeply nested JSON (max 200 levels)
- XSS Protection - All user input is properly escaped before rendering
- Content Security Policy - Strict CSP prevents code injection
- Error Handling - Graceful handling of localStorage quota exceeded and other errors
- No eval() - No use of dangerous JavaScript functions
- Debounced Syntax Highlighting - Smooth typing experience even with large JSON
- Throttled Scrolling - Optimized scroll performance (60fps)
- Smart Highlighting - Files >5MB display as plain text to prevent freezing
- Efficient Parsing - Cached parse results to avoid redundant operations
- Manifest Version: 3 (latest Chrome extension standard)
- Framework: Vanilla JavaScript (no external dependencies)
- Storage: localStorage (optional, with user consent)
- Size Limit: 25 MB max input
- Supported: Chrome 88+, Edge 88+, Brave, Opera
jsonbarber/
├── manifest.json # Extension configuration
├── background.js # Service worker
├── viewer.html # Main UI
├── viewer.js # Application logic
├── viewer.css # Styles
├── syntax-highlighter.js # JSON syntax highlighting
├── icons/ # Extension icons
│ ├── icon16.png
│ ├── icon48.png
│ └── icon128.png
├── LICENSE # MIT License
├── PRIVACY.md # Privacy Policy
└── README.md # This file
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
Found a bug or have a feature request? Please open an issue on GitHub Issues
This project is licensed under the MIT License - see the LICENSE file for details.
- Icon design: Custom JsonBarber character
- Inspired by the need for a truly private JSON formatter
- Built with ❤️ for developers who care about privacy
- Dark mode theme
- JSON Schema validation
- Custom indentation settings (2/4 spaces, tabs)
- Export/Import JSON files
- JSON path explorer
- Diff viewer for comparing JSON objects
- Firefox extension port
Made with 💈 by zoibana
JsonBarber - Trim your JSON, keep your privacy intact.