Start with the failing input
Do not tidy the payload before checking it. Paste the same JSON that failed, because the useful clue is often the exact missing comma, bad quote, escaped character, or extra text that formatting would hide or reject.
When JSON fails in an API request, config loader, test fixture, or parser, validate the raw payload first. Formatting comes after you know the structure is correct.
Do not tidy the payload before checking it. Paste the same JSON that failed, because the useful clue is often the exact missing comma, bad quote, escaped character, or extra text that formatting would hide or reject.
| Situation | Why validation should come first |
|---|---|
| You copied JSON from logs or a terminal | Log output often contains truncated text, escaped characters, or extra wrapper text that makes the payload invalid. |
| You edited the payload manually | Manual edits often introduce missing commas, mismatched quotes, or trailing commas. |
| An API request or parser is failing | The failure may be plain syntax, not business logic. Validation helps you rule that out fast. |
| You are not sure whether the JSON is complete | Validation tells you whether you can trust the structure before you spend time formatting it. |
Many developers search for json formatter after seeing an error, but a formatter is not a debugger for invalid syntax. This page covers the broken-payload workflow: prove parseability first, then format for review.
Validate first when the payload may be broken, copied from logs, edited manually, or already throwing parser errors. Formatting comes after the JSON is structurally valid.
The most common errors are missing commas, unquoted keys, bad quotation marks, trailing commas, unmatched braces, and extra characters after the payload.
Once the JSON validates cleanly, open the JSON Formatter to make it easier to read, debug, or share in a redacted form.