Boneyard Tools

JSON Formatter and Validator

Paste JSON to format, validate and minify it instantly. Choose indentation, sort keys, and spot syntax errors with line and column hints.

How to format JSON

  1. Paste your JSON into the editor.
  2. Choose pretty-print or minify, set indentation, and toggle key sorting.
  3. Copy the result or download it as a .json file.

Examples

Pretty-print

{"name":"Ada","skills":["math","logic"]}
{
  "name": "Ada",
  "skills": [
    "math",
    "logic"
  ]
}

Frequently asked questions

Does this validate JSON too?

Yes. If the JSON is invalid, you get the error message with a line and column hint where possible.

Is my JSON sent to a server?

No. Formatting and validation happen entirely in your browser.

Can I sort object keys?

Yes. Turn on key sorting to order keys alphabetically at every level, which is handy for diffs.

What indentation can I use?

Two or four spaces for readable output, or minify to strip all whitespace for the smallest size.

Learn more

Related tools