Skip to content
TodayHelp Calculators

JSON formatter & validator

Ready

Pretty-print, minify or validate JSON in your browser. Errors are shown with the exact line and column, and you can sort keys and choose the indentation.

How to use

  1. Paste your JSON into the input box.
  2. Choose Format, Minify or Validate. Optionally pick the indentation and sort keys alphabetically.
  3. If the JSON is invalid you’ll see the line and column of the problem with a snippet around it.

Formula

  • Follows the JSON standard (RFC 8259): double-quoted strings, no comments, no trailing commas

Worked example

{"b":1,"a":"x"} → formatted with 2-space indentation and sorted keys: { "a": "x", "b": 1 }

FAQ

Is my JSON uploaded anywhere?

No. Everything runs in your browser; nothing is sent to our server.

Why is my JSON with comments rejected?

Standard JSON doesn’t allow comments, single quotes or trailing commas. Remove them and try again.

Related tools