JSON Formatter and Validator

Paste JSON to validate it, make it readable or compress it into one line.

Loading tool...

How to use JSON Formatter and Validator

  1. Paste your JSON.
  2. Choose indentation or minify.
  3. Copy the formatted result, or fix the error shown.

About this tool

The formatter parses your JSON with the browser's strict parser, so anything that works here will also work in JSON.parse. Invalid input shows the parser's message, which usually points at the position of the problem such as a trailing comma or single quotes.

Nothing is uploaded, so it is safe to use with API responses that contain private data.

Frequently Asked Questions

Why is my JSON invalid?
Common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments, none of which are allowed in JSON.
Does formatting change the data?
No. Only whitespace changes. Key order is preserved.

Related tools