Skip to main content
SwiftTools

JSON Formatter

Free JSON formatter, validator and minifier. Pretty-print, compress and check JSON syntax instantly in your browser.

About JSON Formatter

Format, minify or validate JSON in one place. Paste a JSON string and get it pretty-printed with your preferred indent, compressed to a single line, or checked for syntax errors. Everything runs locally, so API responses and config files never leave your machine.

How to use it

  1. 1Paste your JSON into the input box.
  2. 2Choose Format, Minify or Validate only.
  3. 3For formatting, pick an indent size (2, 4 or 8 spaces).
  4. 4Copy the result, or read the validation status.

Examples

Pretty print

Input
{"name":"SwiftTools","tools":20,"free":true}
Result
{
  "name": "SwiftTools",
  "tools": 20,
  "free": true
}

Minify

Input
{ "a": 1, "b": [1, 2] }
Result
{"a":1,"b":[1,2]}

Frequently asked questions

Does it fix common JSON mistakes?

It reports where the syntax is wrong, but it does not silently rewrite your data. It will not add missing quotes, remove trailing commas, or convert single to double quotes - those changes need to be made in the source.

Is my JSON sent to a server?

No. Parsing, formatting and validation all happen in your browser using the built-in JSON engine.

Can I format large API responses?

Yes - paste the whole response body and format it. There is no artificial size limit for typical use.