Skip to content

JSON formatter & validator — beautify or minify

Paste JSON to validate it, pretty-print with indentation, or minify to one line for transport. API responses squashed into a single row and config files with a stray comma — clear error positions beat guessing in the dark.

Private · Fast · Free

Strict JSON forbids comments, trailing commas, and single-quoted keys. Copying from JavaScript objects causes most failures.

Pretty mode helps humans; minify saves bytes or fits length limits — neither changes meaning when the JSON is valid.

When validation fails, look next to the reported line: missing quote, extra comma, single quotes.

How to use

  1. Paste JSON text
  2. Validate or beautify to see errors
  3. Minify when you need a compact payload
  4. Copy the result

What formatting gives you

  • Inspect structure without opening an IDE.
  • Errors point near the break — good for learning and fixes.
  • Toggle beautify/minify quickly.

Scenarios

  • One-line gateway JSON responses
  • Config snippet from chat without VS Code
  • Pretty JSON for docs or tickets

Tips

  • Validate before beautify — invalid JSON will not format meaningfully.
  • Strip `undefined` and functions when copying from browser consoles.
  • Huge JSON may lag on phones; trim to the failing section.

Contrast

Input Output Note
{"a":1,} Validation error (trailing comma) Classic mistake
Single-line JSON Indented tree Easier to read

JSON FAQ

JSON5 with comments?
This page expects standard JSON. Remove comments and trailing commas first.
Will key order change?
Output follows parsed structure; do not rely on key order for semantics.
Big integers?
Very large numbers may hit JS number limits. Use specialized tools for financial precision.

Related tools