Simple & private
JSON Formatter
Format, validate or minify JSON.
What is this tool?
The JSON Formatter checks that a block of JSON is valid and lays it out with clear, readable indentation, or compresses it into a single compact line when you switch to Minify.
How to use this tool
- Paste your JSON into the input box.
- Choose "Format JSON" for readable indentation or "Minify JSON" to compress it.
- Click "Run tool".
- If the JSON is invalid, fix the reported error and try again.
Example
Pasting {"name":"Sam","age":30} and choosing Format JSON lays each key on its own indented line, making the structure easy to scan.
Common use cases
- Debugging an API response that arrived as one long line
- Making a config file easier to read before editing it
- Minifying JSON before using it in production
- Spotting a missing comma or bracket in a broken file
Frequently asked questions
What happens if my JSON is invalid? +
The tool shows an error message describing what went wrong so you can fix it and try again.
Does formatting change the data? +
No, formatting only changes whitespace and indentation. The keys and values stay identical.
Is my JSON sent anywhere? +
No, validation and formatting both happen locally in your browser.