Skip to content
Calixo

JSON Formatter

Pretty-print and validate JSON, entirely in your browser.

Inputs

Saved Scenarios

— select 2+ to compare

Formatted JSON

{ "name": "example", "count": 42, "active": true }

Spark says

Formula

Formatted=JSON.stringify(JSON.parse(Input), null, 2)Formatted = JSON.stringify(JSON.parse(Input),\ null,\ 2)
2
— Indentation width in spaces

What is the JSON Formatter?

This validates JSON by parsing it, then re-serializes it with consistent 2-space indentation — a quick way to check whether JSON is valid and make dense or minified JSON readable.

How to use it

  1. 1 Paste JSON into the input field.
  2. 2 The formatted (or an error) appears below as you type.

Worked examples

Limitations

  • If the input isn't valid JSON, an error message is shown instead of a best-effort guess — this is a strict validator/formatter, not a lenient one that tries to fix broken syntax.

Frequently asked questions

Does this tool send my JSON anywhere?

No — formatting happens entirely in your browser using the standard JSON parser; nothing is transmitted to a server.

Why does my JSON show an error?

Common causes are trailing commas, single quotes instead of double quotes, or unquoted keys — standard JSON requires double-quoted keys and strings, and no trailing commas.