Skip to content
toola.

{…} → pretty

JSON formatter and validator

Paste JSON to pretty-print it with clean indentation, minify it for production, or find exactly where it’s broken. Everything runs locally, so API responses, config files and tokens stay private.

Private: your files never leave your device.

Indent

How was this tool?

How to use JSON formatter

  1. Step 1: Paste your JSON into the left box.

  2. Step 2: Choose an indent and press Format (or Minify).

  3. Step 3: Copy or download the result. Errors show the exact line and column.

Common JSON errors

  • Trailing commas: [1, 2, 3,] is valid JavaScript but invalid JSON.
  • Single quotes: JSON strings and keys must use double quotes.
  • Unquoted keys: {name: "x"} must be {"name": "x"}.
  • Comments: JSON has none; remove // and /* */ lines.
  • Special values: undefined, NaN and Infinity are not allowed; use null or a number.

The error message points to the line and column where parsing stopped; the real mistake is usually just before it.

Formatting vs minifying

Formatted JSON (indented, one value per line) is for reading and for clean diffs in version control. Minified JSON removes all whitespace for the smallest payload in APIs and config bundles. The data is identical either way. Your JSON stays in the browser, so it is safe to paste API responses that contain tokens or personal data.

Frequently asked questions

Is it safe to paste API responses with secrets?

Yes. The JSON is parsed by your own browser and never sent to a server.

Why is my JSON invalid?

Common causes are trailing commas, single quotes instead of double quotes, comments, or unquoted keys. Toola points to the line and column where parsing failed.

What does “Sort keys” do?

It orders object keys alphabetically at every level, which makes two JSON files much easier to compare.