Skip to content
hateitall

JSON Formatter

Turn a one-line API response into readable, indented JSON, or squeeze a config file down to one line.

Processed locallyIn: JSONOut: JSON

Loading tool…

How to use json formatter

  1. Paste JSON or open a .json file.

  2. Choose 2 spaces, 4 spaces, tabs or Minify.

  3. Turn on key sorting or ASCII escaping if you need them.

  4. Copy the result or download it as a .json file.

What this tool does

  • Indents with 2 spaces, 4 spaces or tabs, or removes all whitespace.
  • Sorts keys alphabetically at every level, which makes two files easy to compare by eye.
  • Escapes non-ASCII characters as \u sequences for systems that only accept plain ASCII.
  • Warns about duplicate keys and integers too large to keep exactly.

How the result is verified

The formatted output is parsed again and compared with the original value for value. If anything differs, the download button stays off.

Frequently asked questions

What does minify do?

It removes every space and line break that sits outside a string, giving the smallest valid JSON. The data itself is unchanged.

Will sorting keys change my data?

No. JSON objects have no meaningful key order, so sorted output holds exactly the same data. Array order is never touched.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Find JSON syntax errors with the exact line and column

JSON→ ReportLight on device

Collapsible, searchable tree view that stays fast on large files

JSON→ PathLight on device

Format, validate, tree view, schema, diff and CSV in one tabbed workspace

JSON · CSV→ JSONModerate on device

Compare two JSON documents by structure, with the path of every change

JSON→ ReportLight on device