Dev Tools
JSON Formatter
Takes messy JSON (or one long line), returns it nicely formatted. Also detects syntax errors.
Ctrl+Enter Format
Esc Clear
What does JSON Formatter?
A JSON formatter that formats and minifies JSON, highlights syntax in colour, and shows an interactive tree for navigating data.
How to use JSON Formatter?
- Paste raw JSON into the input box.
- Click "Format 2" for 2-space indent, "Format 4" for 4 spaces, or "Minify".
- Switch to the tree view to explore the data structure interactively.
Key features
- Syntax highlighting: keys, strings, numbers and booleans in distinct colours
- Interactive JSON tree with collapsible objects and arrays
- Shows exact line and column number on syntax errors
Frequently asked questions
What happens if the JSON is invalid?
The tool shows an error message with the line and column number to help you locate the problem fast.
Can I minify already-formatted JSON?
Yes. Click "Minify" to strip all whitespace — useful for sending JSON in API requests.
Is this tool free?
Yes, this tool is completely free and requires no registration.
Is my data saved?
No. All calculations happen in your browser only — no data is sent to any server.