KitJade
Developer ToolsRuns in your browser

JSON Formatter

Beautify or minify JSON, with precise error positions.

Use the JSON Formatter tool

Runs in your browserUpdated Report a problem

What this json formatter does

JSON Formatter turns a wall of compact or badly indented JSON into a structure you can actually read. It parses the document strictly, then re-serialises it with two-space, four-space or tab indentation. Minify mode does the reverse: it strips every unnecessary space and newline for production payloads.

Because the parser runs inside this page, API keys, tokens and customer records pasted here are never transmitted. The formatter also reports the line and column where parsing failed, which is usually faster than hunting through the raw text yourself.

Why use it

  • Inspect API responses and webhook payloads without installing an editor extension.
  • Catch trailing commas, missing quotes and unescaped characters before they reach production.
  • Produce compact JSON for config files, request bodies and embedded data.

How to use it

  1. 1Paste or type your JSON into the input panel.
  2. 2Choose an indent size, then press Format (or use the Minify action).
  3. 3If the document is invalid, read the error message showing the line, column and expected token.
  4. 4Copy the result or download it as a .json file.

Worked examples

Beautify a compact API response

Input

{"id":42,"name":"Ada","roles":["admin","billing"],"active":true}

Output

{
  "id": 42,
  "name": "Ada",
  "roles": [
    "admin",
    "billing"
  ],
  "active": true
}

Common syntax error

Input

{"name": "Ada",}

Output

Unexpected token } — a trailing comma is not allowed in JSON.

JSON is stricter than JavaScript object syntax. Remove the comma after the last property.

Common mistakes

  • Pasting JavaScript objects that use single quotes, comments or unquoted keys — JSON requires double quotes.
  • Assuming a large document is invalid when the browser has actually truncated the paste; check the character count.
  • Formatting untrusted JSON with a tool that uploads it to a server. Use a local formatter for secrets.

Frequently asked questions

Does the JSON formatter upload my data?
No. Parsing and formatting happen in JavaScript in your browser. Nothing is sent to KitJade or any third party.
What is the largest JSON file I can format?
It depends on your device memory, but documents of several megabytes are usually fine on a modern desktop. Very large files may make the tab sluggish; split them or use a desktop tool.
Does formatting change my data?
No. Formatting only changes whitespace. Key order is preserved, and numbers are re-serialised exactly as JavaScript's JSON parser reads them.
Can I sort keys alphabetically?
Yes. Enable “Sort keys” before formatting to order object keys alphabetically at every level. Array order is never changed.
All tools