JSON Formatter & Validator

Format, validate, minify and beautify JSON with clear error messages.

Tool

Was this tool useful?

About this tool

About JSON Formatter & Validator

Make messy JSON readable, find syntax errors with line numbers, or minify it for production.

How it works

JSON is parsed with the browser’s built-in parser; errors report the position of the first problem.

Example

{"a":1,"b":[1,2]} formatted with 2 spaces becomes a neat, indented block.

How to use this tool

  1. Paste your JSON.
  2. Click Format, Minify or Validate.
  3. Copy or download the result.

Frequently asked questions

Is my JSON sent anywhere?

No. It is processed in your browser.

Can it sort keys?

Yes, tick “Sort keys” to order object keys alphabetically.

Does the JSON Formatter & Validator send my data to a server?

No. The JSON Formatter & Validator runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.