JSON Formatter & Validator

Format, minify and validate JSON online.

About this tool

JSON is the format most web APIs and apps use to exchange data. When it arrives on one long line it is hard to read, so a formatter adds indentation and line breaks. A validator tells you whether the syntax is correct and where it breaks.

Paste your JSON into the box and press Format to get a readable version with two-space indentation. Press Minify to remove all extra spaces, which saves bytes when you send data over a network. If the JSON is invalid you will see the parser message, for example an unexpected token at a position.

The most common mistakes are trailing commas, single quotes instead of double quotes, and keys without quotes. The tool runs entirely in your browser, so private API responses and config files stay on your device.

FAQ

Why does it say invalid JSON?

Common causes are trailing commas, single quotes, unquoted keys and comments, none of which are allowed in JSON.

Is there a size limit?

Only your browser memory. Files of a few megabytes work fine.

More tools