Paste JSON on the left. The right side shows it cleanly formatted, minified, or with keys sorted. Output is updated whenever the input changes or the options change.
Paste or type your JSON below.
Pick how to display the parsed JSON.
Paste JSON on the left to see formatted output here.
It reads JSON text and produces a formatted, minified, or alphabetised version of the same data. The input is parsed against the JSON specification, and the output is regenerated from the parsed structure. See the section below for the limits that come from using a standard JSON parser.
No. The page loads from the server, but once it is open in the browser the parsing and formatting both run locally with built-in browser functions. There is no upload, no API call, and no server-side processing for the JSON itself.
Format outputs the JSON with indentation and line breaks for human reading. Minify outputs the same data on a single line with no extra whitespace, which produces the smallest file size.
When enabled, every object in the JSON has its keys reordered to ascending alphabetical order. Arrays keep their original order — only the keys inside objects are sorted. Sorting is recursive, so deeply nested objects are sorted as well.
The tool follows the JSON specification strictly. Common reasons for an invalid result include: trailing commas after the last item, single quotes around strings or keys, unquoted object keys, comments inside the JSON, or unescaped control characters. The error message shows the line and column where parsing stopped.
No. The JSON specification does not allow comments. If your file contains // or /* */ comments, parsing will fail at the first comment. Remove the comments and try again.
There is no fixed limit set by this tool. Practical performance depends on the device and browser. Inputs in the megabyte range typically format in well under a second on a modern desktop. Very large files can slow down the browser tab while rendering the output.
For typical JSON, the structure, keys, values, and array order pass through unchanged — only whitespace and (with the sort option) the order of object keys change. There are a few known limits that come from using a standard JSON parser: if an object contains duplicate keys, only the last value for that key is kept; integer literals above the JavaScript safe-integer limit (about 9 × 10¹⁵) are stored as 64-bit floats and may be rounded; the number -0 is normalised to 0; and numbers in scientific notation are re-emitted in plain decimal form. The tool shows a warning above the output when it detects any of these in the input.