←
JSON Formatter & ValidatorRuns in your browser

Paste JSON above to check it and tidy it.

More info

How to use it

Paste JSON into the left box. If it is valid, the right box shows it tidied in the style you picked: two or four spaces, tabs, or minified into a single line for sending over a network. Sort keys puts the keys of every object in alphabetical order, which makes two files easier to compare. Press Copy result to take the output away.

If something is wrong, the message gives the line and column and points at the spot with a caret. The checker is strict, as JSON is: keys and strings need double quotes, there are no trailing commas, no comments, and no single quotes.

Common mistakes

Trailing comma after the last item in a list or object. Single quotes around strings. Missing comma between two items. Unquoted keys such as {name: 1}. Line breaks inside a string, which must be written as \n. Comments, which JSON doesn’t allow.

Questions

Is my data sent anywhere? No. The check and formatting run in your browser, so private data and keys stay on your device. Nothing you paste is saved either; only your style choice is.

Are big numbers changed? No. Numbers are written back exactly as you typed them, so an id like 12345678901234567890 is not rounded the way many tools do it.

How large can it be? Up to about five million characters. Very large files may make the page slow to respond.