JSON Formatter Details
JSON Formatter expands JSON that has been squeezed onto one line or edited by hand, and tells you where it breaks when the syntax is invalid.
Use it while reading an API response, unpacking a body from a log line, or hunting the missing comma in a config file. The work happens in your browser and the text never leaves it.
How to use it
The steps line up with the interface:
- Paste the JSON into the input box.
- Press Run tool, or use the Ctrl + Enter shortcut.
- Copy the result or download it as a .txt file.
Technical details
How the formatting behaves:
- Indentation is two spaces and key order is kept as it arrives.
- Invalid JSON returns the browser parser error, which points at the position that failed.
- Everything runs client side: no upload, no request carrying your data.
- The line under the output panel reports characters, lines and bytes.
Is this the right tool
This page is the right one for making data readable or checking that it parses. To move the data into a spreadsheet use JSON to CSV, and for the other direction use CSV to JSON.
It validates syntax, not schema: any parseable text is accepted regardless of whether the fields are the types you expect. Very large inputs can freeze the tab briefly while the browser parses them.
Quick tips
- A position in the error message usually means a missing or trailing comma.
- If the formatted output goes into version control, keep the same indentation every time to reduce diff noise.
- Single-quoted text is not JSON; convert the quotes before parsing.
Privacy and data handling
The work happens locally and your data stays on the device. The single outgoing request is the usage counter, and your text is not part of it. Advertising and measurement cookies operate at page level, never inside the tool.