JSON Formatter & Validator

Pretty-print, minify, and validate JSON in your browser. Instant feedback on syntax errors with line numbers.

Three operations in one place: pretty-print (indent), minify (strip whitespace), and validate (check syntax). The output area updates as you type, and invalid JSON is pointed at the exact line so you can fix it fast.

Everything runs locally in your browser — your data is never uploaded. Large inputs (tens of MB) are processed in the background so the page stays responsive, and the live perf badge shows how long each format took.

Example

Input

{"name":"Alice","tags":["a","b"]}

Output

{
  "name": "Alice",
  "tags": [
    "a",
    "b"
  ]
}

Frequently asked questions

Why is my JSON invalid?

Common causes: trailing commas (not allowed in JSON), single quotes around strings (must be double), unquoted keys, or unescaped control characters inside strings.

What's the largest JSON I can format?

Limited only by browser memory. We've tested files up to 100 MB. For files >50 MB, browsers may slow down — consider using a CLI tool like jq.

Does it sort keys?

Off by default. Enable 'Sort keys' to alphabetize object keys at every nesting level — useful for diffs.

Related tools