Development and data

How to format and check JSON before sharing it

Indentation helps review a small fictional configuration. Minification removes formatting whitespace but does not guarantee that the document satisfies the recipient’s rules.

Before you start

Text is processed in the browser. Consider the content before using it and read the privacy policy.

Privacy

How to use it

  1. Enter {"name":"Ada","active":true} in the JSON Formatter.

  2. Format it and check the properties and values.

  3. Minify it; try {"x": } to see a syntax error.

JSON Formatter

Worked example

The formatted version keeps name as text and active as a boolean. The minified version removes formatting whitespace.

Minified result: {"name":"Ada","active":true}.

RFC 8259: JSON

Limits and checks

The tool checks syntax, not schema or meaning; duplicate keys may be overwritten when parsed. It uses JavaScript numbers: non-finite numbers and unsafe integers are rejected, but other decimals may also be rounded. Use strings for exact values when the destination permits them.

Next step

If the data is in CSV rows, see how to convert them into JSON objects.

How to convert a CSV table into JSON objects
Back to the blog