Step-by-step instructions
Useful for inspecting API responses, configuration files, request payloads and nested objects that are difficult to read in one line.
Paste the JSON
Copy your JSON into the formatter. Start with the complete object or array when you are debugging a response.
Format the structure
Run the formatter to add indentation and line breaks so nested objects and arrays are easier to inspect.
Read validation errors
If the input is invalid, look for the reported problem and inspect nearby punctuation such as commas, braces, brackets and quotation marks.
Correct and format again
Fix one issue at a time, then run the formatter again. Valid JSON should parse into a consistent object or array structure.
Copy the clean JSON
Use the formatted output for debugging or documentation. Preserve the original payload separately if it is important evidence.
Practical tips
- JSON strings require double quotes.
- A trailing comma can make otherwise familiar JavaScript-style data invalid JSON.
- When debugging an API, compare the failing payload with a known-valid request to isolate the change.
Frequently asked questions
What does a JSON formatter do?
It improves the visual structure of JSON with indentation and line breaks, making nested data easier to inspect.
Why is my JSON invalid?
Common causes include missing quotes, unmatched braces or brackets, missing commas, and trailing commas.
Is JSON the same as a JavaScript object?
They look similar, but JSON is a data interchange format with stricter syntax rules than a JavaScript object literal.