Skip to main content
← Home

JSON Formatter & Viewer

Format, beautify and validate your JSON

Input JSON

Formatted results will appear here. Your last 3 runs are kept.

Format and validate JSON online

Formatting re-indents JSON with two spaces per level and validates it at the same time: a trailing comma, single quotes or an unclosed bracket produce an error instead of output. Your last three results stay on the page; select two to see a line-by-line diff. Nothing is uploaded.

Examples

Minified input
{"name":"John","age":30,"tags":["admin","dev"]}
Formatted output
{
  "name": "John",
  "age": 30,
  "tags": [
    "admin",
    "dev"
  ]
}
Invalid: trailing comma
{"a": 1,}

Frequently asked questions

Why is my JSON invalid?

The most common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments. All of these are allowed in JavaScript but not in JSON.

Is my JSON sent to a server?

No. Formatting and validation run in your browser, so you can safely paste API responses or configuration with sensitive data.

Can I compare two JSON documents?

Yes. Format both, select them in the history and click “Diff” to see added and removed lines.

Related tools