What is JSON?
JSON, or JavaScript Object Notation, is a text-based format commonly used for representing structured data.
It can contain:
- Objects
- Arrays
- Strings
- Numbers
- Boolean values
- Null values
Why format JSON?
Minified JSON can be difficult to read because everything may appear on a small number of lines.
Formatting adds indentation and line breaks, making the structure easier to inspect.
How to format JSON
- Open the JSON Formatter.
- Paste your JSON.
- Run the formatting operation.
- Review the formatted result.
- Copy the result when ready.
What if the JSON is invalid?
A formatter should not silently produce a misleading result.
If the input contains invalid JSON syntax, the tool should clearly indicate that the JSON could not be parsed and, where possible, provide a useful error location.
Common JSON mistakes
Watch for:
- Missing quotation marks
- Missing commas
- Extra commas
- Incorrect brackets
- Incorrect braces
- Invalid values