Format, validate and minify JSON in your browser. Paste or drop a file, pick 1–16 spaces or tabs, and get readable JSON without changing any number values. Large integers, decimals like 1.0, key order and duplicate keys are kept exactly as written.
A JSON formatter (also called a JSON beautifier or pretty printer) rewrites JSON with line breaks and indentation so its structure is easy to read. This tool also checks that the input is valid JSON and can do the reverse: minify it into a single line.
.json file onto it.format.json).If the input is not valid JSON, the error message from the parser is shown below the editor and the text is left unchanged.
12345678901234567890 or 1.0 are not rounded or rewritten{} and [] stay on one lineInput:
Output with 2 spaces:
No. Formatting and validation run entirely in your browser, and the text is never uploaded.
Many tools parse JSON into JavaScript numbers and print them again, which rounds integers larger than 2^53 and turns 1.0 into 1. This formatter only re-indents the original text, so number literals stay exactly as written.
No. Only standard JSON is accepted; comments, single quotes and trailing commas are reported as errors.
It removes all spaces and line breaks outside of strings, producing the smallest valid JSON on a single line.