About JSON Formatter
Turn a dense, single-line API response into readable, indented JSON, or squeeze formatted JSON down to the smallest size. If the JSON is invalid, you get a clear message pointing to the line and column of the problem.
How to use JSON Formatter
- Paste your JSON into the input box, or load a .json file.
- Click "Format" to indent it, or "Minify" to remove whitespace.
- If the JSON is invalid, read the error message to find the line and column.
- Copy the result or download it as a .json file.
Tips
- Minified JSON is best for sending over the network; formatted JSON is best for reading and debugging.
- Two-space indentation is the most common style; use four spaces or tabs if your project prefers it.
- If you copied JSON from a JavaScript file, remove trailing commas and comments before validating.
- Sorting keys makes it much easier to compare two JSON responses with the Text Diff tool.