JSON Formatter & Validator

Paste JSON, then format, minify or sort it. Nothing leaves your browser.

How it works

Your text is parsed with the browser's strict JSON parser. If it is valid, it is re-printed with your chosen indent, minified onto one line, or printed with object keys sorted. If not, the parser's error is shown.

FAQ

Is my JSON uploaded anywhere?

No. Parsing and formatting happen in your browser and nothing is stored or sent.

Why does it say my JSON is invalid?

Strict JSON needs double-quoted keys and strings, no trailing commas, no comments and no single quotes. The error message from your browser's parser points at the problem.

What does Sort keys do?

It alphabetically orders object keys at every level, which makes two JSON files easier to compare. Array order is kept.

Are large numbers safe?

JSON numbers are read as JavaScript numbers, so integers beyond 9007199254740991 may lose precision.

Tell us what to fix

Please do not enter your name, email, or personal information.

How useful was this tool? (1–5)

May we quote your comment anonymously?

Free tool, provided as is, with no guarantee. Check important figures independently. Please do not enter personal information in feedback.

Free tool, provided as is, with no guarantee. Please do not enter personal information in feedback.