Code and data

JSON Formatter

Format, validate and minify JSON online.

  • Free
  • Runs in your browser: nothing is sent
  • No limit: it runs on your device
  • No sign-up

TryOne objectNestedBroken JSON

About JSON Formatter

Paste any JSON to pretty-print it with consistent indentation, validate it against the JSON spec, or minify it for production. Errors are reported with the exact position so you can find the stray comma fast.

  • Beautify with clean indentation, or minify to the smallest valid output
  • Validation errors point at the line and character that broke the parse
  • Handles large documents without uploading them anywhere
Questions · 2

How do I fix "Unexpected token" errors in JSON?

Paste the JSON here and press Validate. The error message names the exact character position, which is almost always a trailing comma, a single quote instead of a double quote, or an unquoted key.

Does this JSON formatter upload my data?

No. Parsing and formatting happen in your browser, so the JSON never reaches our servers.

Use it from code · API

JSON Formatter runs in your browser, so there is no server call for it. API docs covers the tools you can call from code.