All tools

JSON Formatter

Validate, beautify, and minify JSON locally in your browser.

Validates, formats, and minifies JSON. Processed locally in your browser.

What does the JSON formatter do?

It validates, beautifies, and minifies JSON. Format adds indentation for readability; Minify removes all whitespace for compact output. Invalid JSON shows a clear error message.

How to use it

Paste your JSON into the input, choose Format or Minify, and select an indent size if formatting. The result appears below with a Copy button.

Example

Formatting {"b":1,"a":2} with 2-space indent produces a properly indented, sorted object. Minifying does the reverse — removing all whitespace.

Privacy

JSON is processed entirely in your browser using native JSON.parse and JSON.stringify. Nothing is sent anywhere.

FAQ

Does the formatter sort my keys?+

No. JSON.stringify preserves the key order of the parsed object. The output has the same key order as the input, just formatted or minified.