JSON Formatter & Validator
Pretty-print JSON and catch syntax errors with a clear message.
What this tool does
Raw JSON squashed onto one line is painful to read. This tool pretty-prints JSON with proper indentation and checks it for errors, so you can actually see the structure and fix mistakes fast.
How to use this tool
- 1
Paste the JSON
Include the whole document, starting from the opening bracket.
- 2
Choose indentation
Two spaces, four spaces or a tab. This changes layout only.
- 3
Format and fix
If it fails, read the error position: it points at the character where parsing stopped.
When to use it
- You received minified JSON from an API and want to read it.
- You are debugging a JSON file that will not parse.
- You want to verify that a JSON string you wrote is valid.
- You need neatly formatted JSON to paste into documentation.
How to understand this tool
Formatting changes whitespace, never the data. When a document fails to parse, the usual culprits are a trailing comma after the last item, single quotes instead of double quotes, or an unquoted key, all of which JSON forbids even though JavaScript allows them.
What it will not do
- It does not convert JavaScript objects or comments into valid JSON.
- It does not repair broken data; you have to fix the syntax it reports.
Questions people ask
What counts as valid JSON?
Correct use of braces, brackets, quoted keys and values, commas and no trailing commas or comments.
Why did I get an error?
Common causes are a missing comma, an unquoted key or a trailing comma.
One thing worth knowing
This is a lightweight browser tool — for production-critical work, pair it with your normal linters and tests.