Format messy JSON with 2 space, 4 space or tab indentation, sort keys if you want them, and see key counts and depth while you work. Nothing is uploaded.
Your files are processed in your browser, on your own device. Nothing is uploaded to a server.
A JSON Formatter takes cramped or messy JSON and rebuilds it with clean indentation so you can actually read it. Paste your JSON, pick an indent of 2 spaces, 4 spaces or a tab, and the formatted result appears live. It is free, runs in your browser, and nothing is uploaded.
Paste JSON into the box, or drop in a file, and the formatted version builds as you type. You choose the indent style, and a stats line under the result shows the total object keys, the maximum depth and the input and output sizes, so you can see the shape of the data at a glance.
Key sorting applies at every level of the document, not just the top. Nested objects get the same alphabetical treatment, which makes two versions of a file much easier to compare side by side. If the JSON will not parse, the box shows the parser error message instead of a result, so you know the input needs a fix before formatting can happen. For a closer look at an error, the JSON Validator shows the line and column as well.
API responses are the classic case. A payment gateway, a weather service or your own test server hands back one long line of JSON, and finding one field inside it means squinting at a wall of brackets. Formatted with a clear indent, the same response reads like an outline. You can follow the nesting, spot the field you need and see what sits next to it.
Config files are the second case. Settings for an app, a build tool or a deployment often live in JSON, and a misplaced level of nesting changes what the file actually says. Readable indentation turns a config file from a guessing game into something you can check line by line, and sorted keys make a diff between two versions short and honest.
Learning and teaching count too. Students meeting JSON for the first time understand it faster when the structure is visible, and support teams paste formatted output into tickets so the next person reads the same shape they saw.
This formatter parses your JSON and rebuilds it, and that method carries one limit worth knowing. Browsers read JSON numbers as standard double precision values, so a whole number longer than about 16 digits can lose precision when it is parsed and written back. If your data carries very long integers, such as database IDs, check those figures in the output before you rely on them.
Duplicate keys are a second quiet trap. JSON allows the same key twice in one object, and standard parsing keeps the last value. The formatted output shows that last value, and the earlier one is gone. The formatter does not flag duplicates, so if you suspect them, that check is yours to make.
Comments and trailing commas are not valid JSON, and this page treats them that way. Paste JSON with a comment in it and you get a parse error, not a quietly repaired file. The same goes for single quoted strings and unquoted keys. If you want the one line version instead, the JSON Minifier strips the spacing back out, and the JSON Viewer turns the same data into a collapsible tree.
The formatting runs on your device. Your JSON is not sent to a server, not stored by ToolPeko and not read by anyone here. Close the tab and the text goes with it. There is no account, no daily cap and no run limit. A two line snippet and a full API dump get the same treatment.
Yes. It is free with no account, no daily cap and no limit on how many times you run it.
Two spaces is the most common choice for JSON that people read on screen and in code reviews. Four spaces suits printed output or wide monitors. Tabs take less room and let each reader set their own tab width. Match whatever your project already uses.
No value changes. Sorting only changes the order keys are written in, at every level of the document. The data itself stays the same, and you can turn sorting off at any time.
You see the parser error message instead of formatted output. Fix the input and the result builds again as you type. For the exact line and column of the problem, run the same text through the JSON Validator on this site.
No. The formatter runs in your browser on your own device. Nothing you paste is sent anywhere or stored by ToolPeko.
The page sets no size limit. The practical limit is the memory on your device, and a very large document can take a moment to build. Ordinary API responses and config files format right away.
Same rules as this one: free, in your browser, with nothing uploaded.
Check JSON and find the exact line that breaks it.
Squeeze JSON down to one tight line.
Open JSON as a tree you can fold and explore.
JSON rows turned into a CSV a spreadsheet can open.
A CSV file turned into clean JSON objects.
JSON rewritten as YAML for config files.
YAML config turned into JSON you can use in code.
Indent messy XML so its structure makes sense.