Tool

JSON Formatter

Format and minify JSON. Runs in your browser, your data never leaves it.

This tool runs in your browser. No data leaves your device.

How It Works

A plain formatter built on JSON.parse and JSON.stringify. The indent size is configurable (2 spaces, 4 spaces, or tab). For invalid JSON it returns a clear error message.

Where JSON.parse is strict

JavaScript’s built-in parser follows RFC 8259:

  • Keys must be double-quoted. {name: 'x'} is invalid, {"name": "x"} is valid.
  • No trailing commas. [1, 2, 3,] is rejected.
  • No comments. // note or /* ... */ is not accepted.

These three are where developers get tripped up most often. If you need them, you’re really using JSON5 or JSONC — this tool is for strict JSON.

Minify vs Format

  • Format — for readability. Meaningful in diffs.
  • Minify — to shrink payload size. For HTTP bodies or WebSocket frames.

Both represent the same data; the only difference is whitespace.

Privacy

The JSON you paste is processed entirely in your browser. It is never sent to sade.dev’s backend or any other service.