Developer tool

JSON formatter and validator

Paste messy or minified JSON to make it readable, check that it's valid, or shrink it to one line.

Advertisement
Result

Advertisement

How to format and validate JSON

  1. Paste your JSON on the left, open a .json file, or drop one onto the box.
  2. The formatted result appears on the right as you type. Pick 2 spaces, 4 spaces, tabs, or Minify.
  3. If the JSON is broken, you'll see the line and column of the problem and a tip on how to fix it. Press Format / validate to jump to that spot.
What are the most common JSON mistakes?

A comma after the last item, keys without double quotes, single quotes instead of double quotes, and comments. JSON allows none of these, even though JavaScript does.

Is my data sent to a server?

No. Everything happens in your browser, so it's safe to paste API responses and config files.

Why did a long number change?

JavaScript can only store whole numbers up to 9,007,199,254,740,991 exactly. Longer numbers (like some IDs) get rounded. Store them as strings in your JSON instead.

Advertisement