Tools / JSON formatter
JSON formatter & validator
Check JSON syntax, make it readable, or minify it for compact storage. Processing stays in your browser.
More free checks
Run a full security scan or speed test on your site, or try a related tool.
Related free tools
What it checks
- Parses JSON using the browser's built-in JSON parser and reports syntax errors.
- Format uses two-space indentation; minify removes whitespace outside strings.
- Input is processed locally and is not uploaded.
This checks JSON syntax only. It does not validate an application-specific schema.
How to use it
- Paste JSON into the input box — an API response, a config file or a log line.
- Press Format to indent it for reading, Minify to strip whitespace for storage or a request body, or Validate just to check the syntax.
- If the JSON is invalid, the message under the buttons shows the parser’s error so you can find the broken spot.
- Use Copy result to take the formatted or minified output with you.
Common reasons JSON fails to parse
- Trailing commas after the last item in an object or array — allowed in JavaScript, not in JSON.
- Single quotes around keys or strings. JSON requires double quotes.
- Unquoted keys, such as
{name: "api"}instead of{"name": "api"}. - Comments (
//or/* */), which plain JSON does not support. - Special values such as
undefined,NaNorInfinity, which have no JSON form.
Frequently asked questions
Is my JSON sent to a server?
No. Parsing, formatting and minifying all happen in this page using the browser’s own JSON parser, so API keys or customer data inside the JSON stay on your device.
Does it validate against a JSON Schema?
No. It checks that the text is well-formed JSON. Whether the fields and types match what your application expects is a separate schema check.
Will formatting change my data?
Only the whitespace changes. Keys, values and their order stay the same. One caveat: very large integers beyond JavaScript’s safe range (about 9 quadrillion) can lose precision when parsed, as they do in any browser-based tool.
What indentation does Format use?
Two spaces per level, the most common style for configuration files and API documentation.