Skip to main content

JSON Formatter

Beautify, minify and inspect JSON with clear error reporting.

Runs in your browser

Paste JSON and press Format to see it indented and readable.

About the JSON Formatter

An API response arrives as one dense line and becomes unreadable exactly when you need to understand it. The JSON Formatter re-indents that payload into a readable tree, or collapses a formatted document back into the compact form you want to send over the wire.

When the input is invalid it does not simply say so. It reports the position of the problem and shows the surrounding text, which usually reveals the trailing comma or unquoted key immediately.

How to use the JSON Formatter

  1. 1Paste your JSON into the input panel.
  2. 2Choose an indent width, then press Format.
  3. 3Use Minify when you want the smallest single-line version.
  4. 4If an error appears, read the reported position and fix the input.
  5. 5Copy or download the result.

Features

  • Two, four or tab indentation
  • Minify to remove all optional whitespace
  • Precise syntax error position and context
  • Key, node and depth statistics
  • Optional alphabetical key sorting

Why people use it

  • Understand an unfamiliar API response in seconds.
  • Cut request payload size before sending JSON.
  • Find the exact character that breaks a configuration file.

Common use cases

  • Debugging a webhook payload captured from a log.
  • Tidying a package or configuration file by hand.
  • Comparing two responses after sorting their keys.

Privacy and your data

Parsing and formatting run in your browser. Payloads containing tokens or customer data are never transmitted.

Frequently asked questions