Developer Tool
JSON Formatter & Validator
Format and validate JSON online to spot syntax errors, inspect payloads, and clean up API responses.
Tool area
Everything runs in the browser.
Use this JSON formatter when an API response, config block, webhook payload, or copied snippet arrives minified, messy, or suspicious. Paste the input, check whether it is valid, and inspect a readable version before pasting it into code, documentation, support tickets, or debugging tools.
- Validate before editing so you know whether the original payload was already broken.
- Do not paste secrets, private tokens, or customer data into any browser tool unless policy allows it.
- If JSON includes escaped strings, format the outer payload first, then inspect nested values separately.
How to use
- Paste raw JSON into the input field.
- Check the validation result and error feedback.
- Copy the formatted output only after the input is valid.
Common use cases
- Inspect API responses, webhook payloads, and config snippets.
- Catch malformed JSON before sending it to a developer, API client, or test suite.
- Format compact JSON so teammates can review it in documentation or tickets.
Three JSON errors and how to fix them
Paste each input into the validator, make one correction and run it again. A valid result confirms the syntax. Check the structure required by your application separately.
| Input | Output | Explanation |
|---|---|---|
{"a": 1,} | {"a": 1} | Trailing comma. After the comma the parser expects another property. |
{a: 1} | {"a": 1} | Unquoted key. Object keys need double quotes. |
{"a": [1, 2} | {"a": [1, 2]} | Missing bracket. Close the array before closing the object. |
Look for a reference to a property name, unexpected character or expected closing bracket. Wording varies by browser.
How to read the line and column of a JSON error
In this example, the parser reaches the opening quote of “b” at line 3, column 3. Look at the end of line 2: the first value needs a comma after it. Insert it, then validate the whole input again.
{
"a": 1
"b": 2
}{
"a": 1,
"b": 2
}The browser can change the wording and position it reports. If it gives an offset, check whether it starts at zero. For errors at the end of input, check for open brackets and unclosed strings.
Repair JSON copied from a webpage
Here a label and curly quotation marks reach the clipboard along with the data. Keep only the object, use straight double quotes around the key and value, then validate.
| Case | Example |
|---|---|
Invalid input | Payload: {“name”:“Ada”} |
Valid JSON | {
"name": "Ada"
} |
Fix only the quotation marks that delimit strings. Curly quotes within a value are legitimate text. Copy from the original JSON source when available.
When to format and when to validate
A compact but valid object can be indented to make keys and values easier to scan. An object with a trailing comma fails validation: remove the comma before formatting.
| Case | Example |
|---|---|
Invalid input | {"qty":2,} |
Valid and compact | {"qty":2} |
Valid JSON | {
"qty": 2
} |
Syntax validation checks the JSON structure. For example, a quantity stored as text can pass JSON validation and still fail in an application that requires a number.
FAQ
Will it fix broken JSON automatically?
No. It validates the input and formats it when possible, but it does not guess missing syntax.
What are common JSON errors?
Common errors include trailing commas, missing quotes around keys, unescaped characters, and mismatched brackets.
Can I use large payloads?
Yes, within normal browser limits for pasted content and available browser memory.
Link to this JSON Formatter
If you publish developer resources, API debugging notes or support documentation, this free JSON Formatter & Validator can be linked as a quick browser-based tool for checking copied JSON payloads.
Natural anchor: free JSON formatter
