Free tool

JSON Formatter and Validator

Format, validate and minify JSON. Nothing you paste leaves your browser.

Output

Paste JSON below to pretty print it with consistent indentation, collapse it back to a single line, or find out precisely why it will not parse. Everything runs in your browser tab, so nothing is sent to a server.

Malformed JSON is usually one of four things: a trailing comma, a single quote where a double quote belongs, an unescaped character inside a string, or a missing brace. When parsing fails, this tool reports the line and column so you can go straight to it instead of reading the whole payload.

How to use it

  1. Paste or type your JSON into the input on the left.
  2. Press Format to pretty print it, or Minify to strip every optional space.
  3. If the JSON is invalid, the error banner names the line and column to fix.
  4. Copy the result, or press Clear to start again.

Frequently asked questions

Is my JSON uploaded anywhere?

No. The formatting runs entirely in your browser using the built-in JSON parser. The text never leaves your machine, and this page makes no network request when you press Format.

Why does my JSON say invalid when it looks fine?

The four usual causes are a trailing comma after the last item, single quotes instead of double quotes around keys or strings, a literal newline or tab inside a string that needs escaping, and comments, which JSON does not allow. The error message names the line and column.

What is the difference between formatting and minifying?

Formatting adds newlines and indentation so a human can read the structure. Minifying removes every optional character so the payload is as small as possible to transmit. Both describe exactly the same data.

Is there a size limit?

Only your browser tab memory. Since no upload happens there is no server limit, though very large documents will feel slow to render.

The desktop version

JSON Formatter in Toolbelt

This page does the job in a browser tab. Toolbelt is the same tool as a native Mac app, plus the things a web page cannot do.

Toolbelt

Tools

Input
{"name":"Holizmi","tools":["json","jwt","base64"],"live":true}
Output
{
  "name": "Holizmi",
  "tools": [
    "json",
    "jwt",
    "base64"
  ],
  "live": true
}
Valid JSON. 4 keys, 96 characters.K to switch tools
  • Format a whole folder of .json files in one pass
  • Convert straight to CSV, YAML, TOML, Go structs or TypeScript interfaces
  • Diff two documents side by side with the differences highlighted
  • Reformat whatever is on your clipboard with one shortcut

Coming soon·$29 one-time purchase

One email when it ships. Nothing else, ever.

Everything Toolbelt does

macOS 14+ · Mac App Store

Free tools, forever.

These stay free and run in your browser. The paid Mac app is for when you want them native, offline and on a keyboard shortcut.