📥 Input

Paste or type your JSON below.

— Empty 0 bytes

📤 Output

Pick how to display the parsed JSON.

Paste JSON on the left to see formatted output here.
0 bytes
Runs in your browser Nothing is uploaded No signup

FAQ

What does this tool do?

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.

Is my JSON sent anywhere?

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.

What is the difference between "Format" and "Minify"?

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.

What does "Sort object keys alphabetically" do?

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.

Why is my JSON marked as invalid?

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.

Are comments inside JSON supported?

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.

What is the maximum input size?

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.

Does the tool change my data?

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.