JSON Formatter

Format, validate and minify JSON with clear error locations.

About the JSON formatter

Paste or type JSON on the left and the formatted result appears on the right as you type. ChooseFormat to pretty-print with 2 spaces, 4 spaces or tabs, or Minify to strip all whitespace. If the input is not valid JSON you get the line and column of the first error; selectGo to error to jump straight to it.

Is my data private?

Yes. Formatting runs entirely in your browser with JavaScript. Your JSON is never uploaded or stored on a server.

Common JSON errors

  • Trailing commas after the last item in an object or array.
  • Single quotes instead of double quotes around strings and property names.
  • Unquoted property names, such as {name: "x"}.
  • Comments — standard JSON does not allow // or /* */.

Numbers are processed as JavaScript numbers, so integers larger than 253 may lose precision.