JSON Formatter & Validator

Validates your input with a real parser, pretty-prints it with the indent you choose, and reports syntax errors with a line and column number instead of a vague message.

Runs in your browser Developer tools

Input
Output
Nothing to show yet. Paste JSON and press Format.

How to use

  1. Paste JSON into the input box, or drop a .json file onto it.
  2. Pick an indent width, then use Format to pretty-print or Minify to strip whitespace.
  3. Read the status line: a green check means the document parsed, a red message points at the exact line and column.
  4. Use Sort keys to make two documents diffable, then Copy to clipboard or Download the result.

Frequently asked questions

Is my JSON sent to a server?

No. Parsing happens with the JSON engine already built into your browser, so the text never leaves the page. That makes it safe to format config files and API responses containing credentials.

Why does it reject JSON that looks correct to me?

JSON is stricter than JavaScript object literals: no trailing commas, no comments, keys must be double-quoted, and NaN or Infinity are not allowed. The error message tells you the line and column where parsing stopped.

Can it handle very large files?

Files in the low megabytes format comfortably. Parsing keeps the whole document in memory, so a multi-hundred-megabyte dump is better handled by a streaming command-line tool.

Guides

Related tools