All tools › Developer

JSON Formatter & Validator

JSON breaks easily and fails silently in most apps. Paste JSON here to pretty-print it with your choice of indentation, minify it for production, or just validate it and get a precise error message when something is wrong.

Results

Status —
Result

                    

How it works

JSON is unforgiving: a single trailing comma or single-quoted string makes the whole document unusable, and most parsers just say no. This tool parses your input with the browser's built-in JSON parser, the same strict engine web APIs use. In format mode it re-prints the parsed value with your chosen indentation (2 spaces, 4 spaces or tabs), which normalizes messy payloads into something a human can read and diff. Minify mode strips all insignificant whitespace for production payloads and config files. Validate mode checks syntax only and reports either success or the parser's error, which typically names the character position of the first problem, a missing comma, an unquoted key, or a bracket mismatch are the usual culprits. The round trip through the parser guarantees the output is semantically identical to the input: key order is preserved, numbers and strings are untouched, and duplicate keys keep the last value, matching how virtually all JSON consumers behave. Because everything runs locally, the tool is safe for API responses, tokens and configuration files that should never be pasted into a remote service.

Frequently asked questions

Why is my JSON invalid?

Common causes are trailing commas, single quotes instead of double quotes, unquoted property names and missing brackets. The error message points to the position of the first problem.

Does formatting change the data?

Formatting reprints the data with consistent indentation, in the key order it was written. It does not sort keys or change values, so a format-then-minify round trip returns identical data.

Can JSON contain comments?

JSON has no comment syntax. Comments make the document invalid, whereas the JSONC and JSON5 variants used in some config files allow them.

Is my JSON sent to a server?

No. Everything is parsed locally in your browser with the standard JSON parser, so payloads, tokens and config files stay on your device.

More free tools

Browse all tools →