JSON Formatter and Validator

Paste JSON to format, minify, or check its syntax. Review the result and copy it in one click.

JSON editor

Processed locally
JSON editor

How to format and validate JSON

Paste a JSON value or load the sample. Choose 2 or 4 spaces and select Format. Use Minify for a compact version or Validate to check the syntax. Copy the output when you're ready.

Frequently asked questions about JSON

What's the difference between formatting and minifying JSON?

Formatting adds line breaks and indentation so the JSON is easier to read. Minifying removes unnecessary whitespace and line breaks for a compact output.

How do I find a syntax error?

Select Validate to see the browser's diagnosis. When the position is available, the tool shows the line and column. Check that object keys use double quotes and that there are no trailing commas.

Does formatting keep numbers and keys exactly as entered?

The tool uses JavaScript's native serialization. Duplicate keys are reduced to their last occurrence, and numbers outside JavaScript's precision can be rounded. Use Validate to check syntax without rewriting the input.