JSON Formatter
Format and visualize JSON with ease. Collapse or expand nodes, and copy or delete sections with a click.
Supports high-precision numbers (BigInteger, BigNumber, BigDecimal) and auto-fixes common JSON syntax errors.
All tools on this site run entirely in your browser locally. No data is uploaded to any server.
Common issues that can be repaired:
- Missing quotes: unquoted keys or string values, e.g. {name: "John"}
- Missing commas: commas omitted between object or array elements
- Trailing commas: an extra comma after the last element
- Single quotes: single quotes used instead of double quotes, e.g. {'name': 'John'}
- Special quotes: special characters such as Chinese curly quotes “”‘’
- Comments: contains /* ... */ or // ... comments
- Truncated JSON: content cut off, leaving brackets/quotes unclosed
- Python constants: None/True/False converted to null/true/false
- Escaped strings: removes redundant escape characters, e.g. {\"key\": \"value\"}
- JSONP: removes the callback({...}) wrapper
- Code block markers: removes ```json ``` fences
- Ellipsis: removes ... placeholders in arrays/objects
- Multi-line JSON: merges multiple newline-separated JSON entries into an array
Options:
- Sort JSON: Sort by key names
- Minify JSON: Remove spaces and line breaks
- Escape JSON: Escape JSON strings
- JSON to DICT: Convert JSON to Python dict
Common uses:
- Format and beautify JSON for reading and debugging
- Sort JSON key-values for easy viewing
- Compress JSON to reduce transfer size