How to use the JSON Formatter
- Paste JSON into the left box (or open a .json file).
- Choose Beautify or Minify and your indentation.
- Optionally sort keys alphabetically.
- Copy or download the result.
What does this tool do?
The formatter parses your JSON with the browser's native parser, so it's fast and follows the JSON standard exactly. If the JSON is invalid, it shows the line and column of the first problem, with a plain-English explanation such as “trailing comma” or “use double quotes”.
Minify removes all unnecessary whitespace for the smallest possible payload. Sorting keys makes two JSON files easier to compare.
Why use it?
- Read API responses and config files at a glance.
- Find syntax errors fast.
- Safe for sensitive data: nothing is uploaded.
Example
Input: {"name":"Ada","skills":["math","code"]}
Output (2-space indent):
{
"name": "Ada",
"skills": [
"math",
"code"
]
}Privacy
Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.
Frequently asked questions
Why is my JSON invalid?
The most common causes are trailing commas, single quotes instead of double quotes, unquoted keys, comments, and values like undefined or NaN. The error message points to the exact spot.
Is there a size limit?
No fixed limit. Files of several megabytes format in well under a second on a modern computer.
Last reviewed by the M2Toolkit team.