JSON Formatter
Format messy JSON so it is easy to read, minify it for use in code, or find the exact place where it breaks.
Input: 0 characters, 0 words
Output: 0 characters
How to use it
- Paste your JSON into the box.
- Choose Format to make it readable or Minify to make it compact.
- If the JSON is invalid, the message shows what the parser found.
Examples
| Input | Settings | Output |
|---|---|---|
{"name":"Ali","tags":["a","b"]} | Format, 2 spaces | {
"name": "Ali",
"tags": [
"a",
"b"
]
} |
{"name": "Ali", "tags": ["a", "b"]} | Minify | {"name":"Ali","tags":["a","b"]} |
Common uses
- Reading an API response that arrives as one long line
- Checking a config file before you deploy it
- Making JSON small enough to paste into a single line of code
Frequently asked questions
Is my JSON sent anywhere?
No. The formatting happens in your browser. Even so, do not paste live passwords or secret keys into any online tool.
Why does my valid-looking JSON fail?
The most common causes are a trailing comma after the last item, single quotes instead of double quotes, or comments, which JSON does not allow.