JSON Formatter & Validator

Paste JSON to pretty-print it, check that it is valid, or minify it. Invalid JSON is reported with the exact line and column of the error.

Runs in your browser · nothing uploadedFree · no sign-up
Loading tool…

How to use the JSON Formatter & Validator

  1. Paste your JSON.
  2. Choose Format or Minify, plus the indentation.
  3. Copy the result or fix the reported error.

Features

  • Validation with line and column
  • Format with 2 spaces, 4 spaces or tabs
  • Minify
  • Optional key sorting

Frequently asked questions

Is my JSON sent to a server?

No. Parsing and formatting run entirely in your browser, so it is safe for API responses and configuration files.

Why are trailing commas an error?

Standard JSON does not allow trailing commas or comments, even though JavaScript does.