Readable JSON, and proof it is valid
JSON arrives from APIs, config files and logs as one cramped line — or worse, as a line with a syntax error hiding in it. This tool does the three jobs you actually need: format it with 2-space or 4-space indentation so a human can read the structure, minify it back to a single line for production or storage, and validate it, reporting the exact position of the first syntax error (line and column) when it will not parse. Along the way it counts keys, measures nesting depth and reports size, so you know what you are holding before you ship it.
Worked example
Paste {“name”:“CalcViso”,“tools”:265,“free”:true} and press Format · 2 spaces: each key lands on its own line, nested objects and arrays indent by level, and the stats report 3 keys at depth 1. Introduce an error — delete a quote or a comma — and the status flips to invalid with the line and column of the problem, which is the difference between a five-second fix and a five-minute hunt.
How to use this tool
- Paste your JSON on the left, or press Load sample to see the tool work.
- Check the status panel: valid JSON shows key count, depth and top-level type as you type.
- Press Format (2 or 4 spaces) or Minify to write the result to the output box.
- If it is invalid, use the reported line and column to find the offending character.
- Copy the output with one click.
Common JSON errors
Nine errors in ten are one of: a missing comma between items, a trailing comma after the last item (JSON forbids them, unlike JavaScript), single quotes instead of double quotes, unquoted keys, or comments pasted in from a config file. The parser stops at the first error, so fix and re-check — later errors often vanish once the first is repaired. And remember the privacy point: this formatter runs locally, so tokens, keys and payloads you paste here are never uploaded anywhere.