Format, minify, and validate JSON with advanced options like comment removal, key sorting, and search highlighting.
Features
- Format - Pretty-print JSON with customizable indentation
- Minify - Compress JSON by removing whitespace
- Validate - Check if JSON is valid without modifying it
- Remove comments - Strip JavaScript-style comments from JSON
- Sort keys - Alphabetically sort object keys for consistent output
- Search - Find and highlight text within the JSON (with case-sensitive option)
How to Use
- Paste your JSON in the input field
- Select an action: Format, Minify, or Validate
- Choose indentation: 2 spaces, 4 spaces, or Tab
- Enable optional features (remove comments, sort keys)
- Click "Process"
Search Feature
Use the search input to find specific values or keys in your JSON. Matches are highlighted in the output with a count displayed.
Handling Comments
While standard JSON doesn't support comments, many configuration files use JSON with JavaScript-style comments (// and /* */). Enable "Remove comments" to strip these before processing.
Validation
A green banner indicates valid JSON. A red banner shows the JSON is invalid with details about the parsing error.