Make JSON easier to inspect
Formatting is useful when an API response or configuration is hard to read. Indentation exposes nesting and makes it easier to compare field names and values. Syntax validation checks the JSON structure; it does not prove that the data meets your application’s schema.
How to use it
- Paste the JSON you want to review.
- Choose indentation and run the formatter and validator.
- Read any error message, correct the source and check the formatted output.
What to check
Try a small known object, then remove a closing bracket to check that invalid JSON is reported rather than silently accepted.
Limits to keep in mind
Do not include production credentials or private customer data. Syntactically valid JSON can still contain incorrect values or unexpected field types. Very large inputs depend on the memory available in the browser.
Format JSON and find syntax errors before using it
Paste JSON, choose indentation and run the formatter. Valid JSON is printed with consistent spacing. A syntax error must be corrected before formatting can finish. Syntax validation does not confirm that the data matches your application’s schema.
| Input example | Result | Reason |
|---|---|---|
| {"name":"Ada","active":true} | Valid JSON | Object keys are quoted and true is a JSON boolean. |
| {"active":true,} | Invalid JSON | A trailing comma is not allowed. |
| {'name':'Ada'} | Invalid JSON | JSON strings and property names require double quotes. |
Preserve identifiers and numeric precision
Use {"account_id":"00123","amount":19.5,"active":true} as a sample. After formatting, the account ID should remain a quoted string with its leading zeros. Very large integers should usually be carried as strings when passing through JavaScript number handling.
Choose the right next step
Do not paste passwords, API keys or private records into examples. Avoid duplicate property names: parsing and re-serializing an object can discard earlier duplicates. Use schema validation when you need required fields or type constraints checked.
References: JSON format specification: RFC 8259
Questions about this tool
Does valid JSON mean my application will accept it?
No. Syntax validation checks JSON structure. Your application can still require particular fields, types or allowed values that are not checked by this formatter.
What commonly makes JSON invalid?
Missing closing brackets, trailing commas and unquoted property names are common causes. Read the reported error and check the surrounding source characters.
Should I paste an API key into the formatter?
Use a redacted sample instead. The tool formats data; it does not need production credentials to demonstrate a structure problem.
Understand the next step
Get a better result
How to Fix Invalid JSON: Quotes, Commas and Data Types
Follow the examples and checks before using your output.