How to format JSON
- Paste or type your JSON into the box above.
- Click Beautify to indent it, or Minify to compress it.
- If the JSON is invalid, the exact line and column of the error is shown.
- Click Copy to copy the result to your clipboard.
What is JSON?
JSON (JavaScript Object Notation) is a lightweight text format for exchanging data. It is used by almost every web API and configuration system. Valid JSON requires double-quoted keys and strings, and does not allow trailing commas or comments.
Frequently asked questions
Is my JSON sent to a server?
No. Formatting and validation happen entirely in your browser using JavaScript. Your data never leaves your device.
What is the difference between beautifying and minifying JSON?
Beautifying adds line breaks and indentation so JSON is easy to read. Minifying removes all unnecessary whitespace to make the payload as small as possible.
Why is my JSON invalid?
Common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments. The validator shows the line and column of the first error.