Finance 55 tools → Seller Tools 17 tools → Date 19 tools → Health 28 tools → Everyday 25 tools → Math 22 tools → Construction 20 tools → PDF 25 tools → Education 11 tools → Conversion 7 tools → Text 14 tools → Image 22 tools → About → Contact →

Free JSON Formatter

Validation runs as you type. Your JSON never leaves this page — formatting and checking happen entirely in your browser.

Status
—

Detail

About the analysis

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

  1. Paste your JSON on the left, or press Load sample to see the tool work.
  2. Check the status panel: valid JSON shows key count, depth and top-level type as you type.
  3. Press Format (2 or 4 spaces) or Minify to write the result to the output box.
  4. If it is invalid, use the reported line and column to find the offending character.
  5. 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.

Frequently asked questions

Is my JSON uploaded to a server?
No. Parsing, formatting and validation all run in JavaScript in your browser — the same privacy model as every CalcViso tool. You can verify it by loading the page and disconnecting from the internet: it keeps working.
Why does it say my JSON is invalid when it works in my app?
Your app may be accepting a looser dialect: JavaScript objects allow unquoted keys, single quotes, trailing commas and comments; strict JSON allows none of them. The validator here enforces the JSON standard (RFC 8259), which is what APIs and other parsers expect.
What do key count and depth mean?
Key count is the total number of object keys at all levels of the document. Depth is the deepest nesting level — a flat object is depth 1, an object containing an object is depth 2, and so on. Both help judge how complex a payload really is.
Keep going

Related text calculators