DevKit Tools

JSON Formatter

Format, minify, validate and sort JSON in your browser. Errors point to the exact problem. Nothing is uploaded.

Data/JSON Formatter

Format, minify and validate JSON. Errors tell you exactly where the problem is.

Result

✓ Valid JSON - 4 keys, 68 characters.

{
  "name": "DevKit",
  "tools": 60,
  "free": true,
  "tags": [
    "css",
    "html",
    "seo"
  ]
}

What the json formatter does

A JSON parse error tells you the position of the problem, which is usually a trailing comma, a single quote where a double belongs, or an unquoted key. This tool surfaces the parser's own message rather than a vague failure.

Everything runs in your browser, so you can paste an API response containing real data without it leaving your machine.

Formatting and validation are the same action here. The tool parses the text, and if it parses, the pretty-printed result is itself the proof that it is valid; if it does not, the parser's position and message point at where to look. There is no separate check button because a clean format is the check.

Good to know

  • The parser is the browser's own JSON.parse, so it accepts exactly what your code will accept and rejects exactly what it will reject. There is no second, looser parser handing you a false pass.
  • Key sorting is recursive: nested objects are ordered too, which is what makes two deeply nested payloads genuinely comparable in a diff.
  • Numbers are left exactly as written. JSON draws no integer or float distinction, so the tool never rewrites 1.0 to 1 or rounds a long value, which would quietly change your data.
  • Minifying strips every space and newline, not just indentation. That is the form you want for measuring true payload size or pasting into a single-line environment variable.

Using the tool

  1. 1Paste your JSON.
  2. 2Read the validation result: valid shows the key count, invalid shows the parser error.
  3. 3Choose pretty printing with two or four spaces, or minify.
  4. 4Turn on key sorting to make two payloads comparable.
  5. 5Copy the output.

Common questions

Is my data sent anywhere?

No. Parsing and formatting happen entirely in your browser, so nothing is transmitted or stored.

What causes most JSON errors?

Trailing commas, single quotes instead of double, unquoted keys, and JavaScript comments. None of those are valid JSON even though they look fine in code.

Why sort keys?

Two objects with the same data but different key order look completely different in a diff. Sorting both makes a real comparison possible.

Can it handle very large files?

Yes, as far as the tab's memory allows. Because nothing is uploaded there is no server size limit, but a file in the hundreds of megabytes is bounded by the browser, not the tool.

Does it accept JSON5 or comments?

No, deliberately. Comments and trailing commas are not valid JSON, so accepting them would let a file pass here that your API or config loader then rejects. Clean it with the JSON repair tool first if you need to.

Try next

More Text & Data tools