JSON Formatter and Validator

Format, minify or check JSON and see exactly where it breaks.

How to use

What it checks and how it works

Strict mode follows RFC 8259: keys and strings in double quotes, no comments, no trailing commas. The tool parses with jsonc-parser, the parser behind the JSON support in Visual Studio Code, so each error comes with a line and a column. JSONC mode accepts comments and trailing commas, as VS Code's JSON with Comments mode does. Sort keys is optional and orders object keys alphabetically at every depth. It does not repair broken JSON or guess what you meant. Formatting rewrites numbers through JavaScript, so a number beyond 2^53 or with more than 17 significant digits is flagged: it may lose digits in the output.

Why does my JSON fail when it works in my code?

Code often accepts what RFC 8259 does not: single quotes, unquoted keys, comments or a trailing comma. Strict mode points to each one, and JSONC mode accepts comments and trailing commas.

Is my data sent anywhere?

No. The JSON is parsed and formatted inside your browser, so it works with private payloads and nothing is uploaded.

Does it handle Arabic and other Unicode text?

Yes. Strings keep their characters exactly, and the tool does not turn them into escape sequences.

Sources

Related tools

Privacy

Runs in your browser; nothing is uploaded. The interactive tool needs JavaScript.