JSON formatter and validator

Paste JSON to pretty-print it, check it's valid, or minify it. If it's broken, you get the line and column of the mistake and a hint about common causes.

Nothing you type leaves this page

How it works

Paste or type JSON and it is checked as you go. Valid JSON is pretty-printed with the indent you choose, or minified to one line, and you can sort keys to compare two documents more easily.

When JSON is broken, it shows the line and column of the error with a pointer, and hints at the usual causes: single quotes, trailing commas, keys without quotes, and comments, none of which JSON allows.

Questions people ask

How do I validate JSON?

Paste it above. A green message means it's valid; a red one shows exactly where the first error is.

Why is my JSON invalid?

The most common reasons are single quotes instead of double quotes, a comma after the last item, keys without quotes, and comments. JSON is stricter than JavaScript.

Is my data sent to a server?

No. Everything is parsed in your browser, so it's safe to format API responses or config files that contain private data.

More free tools

Found a bug or want another tool? Contact