JSON Formatter & Validator

Format, beautify, minify and validate JSON in your browser. Get the exact line and column of syntax errors. Your data never leaves your device.

Format and validate JSON safely

Paste JSON to pretty-print it with your preferred indentation, minify it for transport, or validate it. When the JSON is invalid the tool shows the line and column where parsing failed.

API responses and configuration files often contain tokens and personal data. This formatter runs locally with your browser's built-in JSON parser, so nothing is uploaded.

Frequently asked questions

Why is my JSON invalid?

Common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments, none of which standard JSON allows.

Does formatting change my data?

No. Formatting only changes whitespace. Very large numbers beyond JavaScript's safe integer range may lose precision, which the tool warns about.

Can I sort keys?

Yes, tick "Sort keys" to order object keys alphabetically.

All tools