← All tools

Tidy up JSON

Lay JSON out neatly and check it.

Stays on this device

Need more than one change? Chain tools together →Something not right? Tell us

Your text

Your tidied JSON

Paste some text and choose Tidy the JSON.

What this tool is for

This lays JSON out with proper indentation so it can be read, and tells you where it breaks if it is not valid. It is what you reach for when an API response arrives as one unbroken line, or when something refuses to accept a config file and will not say which character it objected to.

How to format and validate JSON

  1. Paste the JSON in.
  2. Read the laid-out version, or the error saying where it fails.
  3. Copy the tidied result.

Questions

What are the most common reasons JSON is invalid?

A trailing comma after the last item, single quotes where double quotes are required, and a missing closing bracket. Those three account for most failures.

Does formatting change the data?

No. Only the spacing changes. The values, and the order they appear in, come through exactly as they were.

Can it make a large file smaller again?

Yes, by taking the spacing back out, which is what you want before sending it somewhere rather than reading it.

Is the data I paste uploaded?

No. It is parsed in this browser tab, which matters when a response has keys or customer records in it.

Related tools

Feedback