Skip to content

zoibana/jsonbarber

Repository files navigation

JsonBarber 💈

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.

JsonBarber Icon

✨ Features

  • 🎨 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

🚀 Installation

From Chrome Web Store (Coming Soon)

The extension will be available in the Chrome Web Store shortly.

Manual Installation (Developer Mode)

  1. Download or clone this repository:

    git clone https://github.com/zoibana/jsonbarber.git
  2. Open Chrome and navigate to chrome://extensions/

  3. Enable Developer mode (toggle in the top-right corner)

  4. Click Load unpacked

  5. Select the jsonbarber folder

  6. The JsonBarber icon should appear in your extensions toolbar

📖 Usage

  1. Click the JsonBarber icon in your Chrome toolbar
  2. A new tab will open with the JSON editor
  3. Paste your JSON into the Input panel
  4. 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

Keyboard Shortcuts

  • Ctrl/Cmd + Enter - Beautify JSON
  • Ctrl/Cmd + K - Clear both fields
  • Ctrl/Cmd + Shift + C - Copy output

🔒 Privacy & Security

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

First-Time Privacy 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

🛡️ Security Features

  • 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

⚡ Performance

  • 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

🛠️ Technical Details

  • 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

📦 Project Structure

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

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

🐛 Bug Reports & Feature Requests

Found a bug or have a feature request? Please open an issue on GitHub Issues

📝 License

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

🙏 Acknowledgments

  • Icon design: Custom JsonBarber character
  • Inspired by the need for a truly private JSON formatter
  • Built with ❤️ for developers who care about privacy

📊 Roadmap

  • 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

🔗 Links


Made with 💈 by zoibana

JsonBarber - Trim your JSON, keep your privacy intact.

About

Json Formatter/Validator/Bueautifier Chrome Extension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors