JSON Formatter & Validator

Paste JSON to pretty-print it with your preferred indentation, squeeze it onto one line, or just check that it is valid. Errors include the line and column where parsing stopped.

Runs in your browser. What you enter here is not sent to our server.

How to use it

  1. Paste your JSON into the input box.
  2. Select “Format” to indent it, “Minify” to remove all whitespace, or “Validate only” to check it.
  3. Copy the result or download it as a .json file.

Common JSON errors

  • Trailing commas: a comma after the last item in an object or array is not allowed.
  • Single quotes: keys and strings must use double quotes.
  • Unquoted keys: {name: "Ada"} is JavaScript, not JSON. Write {"name": "Ada"}.
  • Comments: standard JSON has no comments.
  • Special values: undefined and NaN are not valid; use null.

Questions about the JSON Formatter & Validator

Is it safe to paste API responses or config files?

The JSON is parsed by your own browser and is not transmitted to us. You should still avoid pasting live secrets such as API keys into any website out of habit.

Does formatting change my data?

Only whitespace changes. One caveat: very large numbers beyond the range JavaScript can represent exactly may be rounded, and duplicate keys in one object collapse to the last value.

Can it fix invalid JSON automatically?

No. It tells you where the problem is so you can correct it, which avoids silently changing your data.