How to use the JSON formatter
- Paste your JSON into the input box, or press Sample to try it with example data.
- Choose an action. Beautify adds line breaks and indentation, Minify strips all whitespace, and Validate only checks the syntax.
- Copy or download the result. Indentation and key sorting can be changed at any time and applied again.
What the three actions do
Beautify
Turns compact or messy JSON into an indented, readable layout with one property per line. Use it to read an API response, review a configuration file or compare two documents.
Minify
Removes every space and line break that is not part of a value. The data stays identical but the text gets smaller, which is what you want before sending JSON over a network or embedding it in a page.
Validate
Checks that the text is valid JSON. If it is not, the message tells you what is wrong and the line and column where the parser stopped, and the cursor jumps to that position.
Common JSON mistakes
- Trailing commas —
{"a": 1,}is not valid; remove the last comma. - Single quotes — strings and property names must use double quotes.
- Unquoted keys —
{name: "Ada"}is JavaScript, not JSON. - Comments — JSON has no comment syntax.
- Special values —
undefined,NaNandInfinityare not allowed; usenullinstead.
Frequently asked questions
Is my data sent to a server?
No. Formatting and validation use your browser’s built-in JSON parser, so the text never leaves your device.
Does formatting change my data?
No. Beautify and Minify only change whitespace. Sorting keys changes the order of properties, which does not change the meaning of a JSON object.
Is there a size limit?
There is no fixed limit; very large documents (tens of megabytes) depend on the memory your browser has available.