JSON Formatter & Validator
Format, validate, and beautify JSON strings. Perfect for developers working with APIs and JSON data
JSON Tool
About JSON Formatter & Validator
Paste JSON into the box and this tool will format it with two-space indentation so it is easy to read, shrink it onto a single line (minify), or check whether it is valid. If the JSON has a mistake, the error message from the parser tells you what it found and where, such as a missing comma, a trailing comma, single quotes instead of double quotes, or an unquoted key.
The work is done in your browser by its built-in JSON parser, so your data is not uploaded. That is useful for API responses, config files and logs that you do not want to paste into a random server. One thing to know: because the JSON is parsed and written back out, numbers are handled as JavaScript numbers. Whole numbers larger than 9,007,199,254,740,991 lose precision, and a number like 1.0 is written as 1. If you need exact big numbers, keep them as strings.
The tool checks JSON syntax only. It does not check your data against a schema, and it does not accept comments or trailing commas, because those are not part of standard JSON.
Who uses it and when
Reading API responses
Turn a single long line into readable, indented JSON.
Finding syntax errors
Validate JSON and see the exact parser message.
Shrinking payloads
Minify JSON before putting it in a request or config.
Sharing snippets
Copy a cleanly formatted version into a ticket or chat.
Why use this JSON Formatter & Validator
Format, minify and validate JSON without leaving the browser.
Format and minify
Pretty-print with two spaces, or squeeze to one line.
Validate
Get the parser's own error message when JSON is invalid.
Stays in your browser
Your data is not sent to a server.
How it works
Paste your JSON
Put it in the input box.
Choose an action
Format, Minify or Validate.
Copy the result
Use the Copy button to take it with you.
Frequently asked questions
Is my JSON uploaded?
No. It is parsed and formatted in your browser.
Does it change my numbers?
It can. Whole numbers above 9,007,199,254,740,991 lose precision and 1.0 becomes 1. Use strings for exact large values.
Why is my JSON invalid?
Common causes are trailing commas, single quotes, unquoted keys, comments and missing brackets. The error message points to the problem.
Does it validate against a schema?
No. It checks syntax only.