Skip to main content
SK Play Labs logoSK Play Labs

JSON Formatter

Prettify, minify, and validate JSON.

Output
Result appears here…

Runs entirely in your browser — nothing you enter is uploaded or sent to a server.

It checks that your JSON is well-formed, not that the data is correct — and standard JSON has no comments or trailing commas, so those are flagged as invalid. Read our full disclaimer.

About this tool

Reformats JSON so it's easy to read, collapses it back to a single line, and checks that it's valid — pointing to the line and column when it isn't. It's handy for inspecting API responses, tidying config files, or catching a stray comma.

Try it

Paste {"a":1,"b":[2,3]} and press Format to see it indented across lines. Remove a bracket and it tells you exactly where the JSON breaks.

How to use

  1. 1Paste or type your JSON into the input box (or load the sample).
  2. 2Press Format to pretty-print it with 2-space indentation.
  3. 3Press Minify to strip all whitespace into a compact single line.
  4. 4If the JSON is invalid, read the error message to find and fix the problem.

Features

  • Prettify with clean, consistent indentation.
  • Minify to the smallest valid single-line form.
  • Clear validation errors with line and column when available.
  • One-click copy of the formatted or minified output.

Frequently asked questions

Why does it say my JSON is invalid?

Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, or a missing bracket. The error message points to the position so you can fix it.

Does it support comments?

No. Standard JSON doesn't allow comments, so JSON with // or /* */ will be reported as invalid.

More developer tools

View all