Developer tools

JSON formatter

Format or minify JSON and catch syntax errors.

JSON formatter
Esc to restore

Your inputs

Results update as you type. Larger files run when you press Update result.

Your result

LOCAL & PRIVATE

Your result will appear here.

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Formats strict JSON while preserving numeric literals, property order and duplicate keys. Comments and trailing commas are invalid. Supports up to 2 MB, 50,000 values and 128 nesting levels.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Your JSON
{"message":"Hello","items":[1,2,3]}
Formatting
2 spaces

Example result

{
  "message": "Hello",
  "items": [
    1,
    2,
    3
  ]
}