Answer

How to format (beautify) JSON

Pretty-print, validate, and minify JSON instantly in your browser. Free, private, nothing uploaded.

Formatting JSON re-indents it with consistent spacing and line breaks so it is readable, and validates it at the same time. Paste minified or messy JSON into a formatter and it returns a beautified version (and flags any syntax error).

Input
{"name":"app","port":8080,"tags":["a","b"]}
Output
{
  "name": "app",
  "port": 8080,
  "tags": ["a", "b"]
}

The data is unchanged — only whitespace is added. Switch to Minify to strip it back out.

Open the JSON Formatter → Free · runs in your browser · nothing uploaded

Steps

  1. Open the JSON tool and paste your JSON into the input.
  2. It is validated and beautified instantly; choose your indent (2 or 4 spaces, or tabs).
  3. Copy the formatted result, or switch to Minify mode to compact it.
  4. If it is invalid, the error message points to the line and character to fix.

Frequently asked questions

How do I minify JSON instead?
Switch the tool to Minify mode — it removes all insignificant whitespace, producing the smallest valid JSON for transport or storage.
Does formatting change my data?
No. Formatting only adds or removes whitespace; keys, values, and order are preserved. It also validates the JSON, so a syntax error is reported rather than silently altered.