Free Online JSON Formatter, Validator & Minifier
Paste JSON to make it readable, shrink it, or check that it is valid. If there is a syntax error, the tool shows the message your browser reports. It does not repair broken JSON for you.
How to Use JSON Formatter & Validator?
Paste Raw JSON
Paste your minified or messy JSON payload into the left input editor.
Select Format Mode
Click "Beautify (2/4 Spaces)", "Minify JSON", or "Validate Only".
Inspect & Copy
Check the valid or invalid message and copy the formatted JSON result.
Reading and checking JSON
JSON (JavaScript Object Notation) is a common text format for web APIs and configuration files. Programs read it with strict parsers, so a single stray comma can make the whole file fail. The rules are defined in RFC 8259.
Key Rules of Valid JSON
- Double Quotes Only: All object property names (keys) and text values must be wrapped in standard ASCII double quotes (
"key": "value"). Single quotes are forbidden. - No Trailing Commas: Placing a comma after the final key-value pair in an object or the last item in an array causes JSON parsing to fail completely in strict parsers.
- Types Allowed: Objects, Arrays, Strings, Numbers (integer/float), Booleans (
true/false), andnull. Functions,undefined, and comments are not allowed in standard JSON.
What this tool does and does not do
The tool reads your JSON with your browser's own JSON parser and writes it back out, indented or compact. Because of that, very large numbers can lose precision, and if a key appears twice only the last value is kept. Comments and trailing commas are reported as errors rather than fixed.
Frequently Asked Questions
What are the most common JSON syntax errors?
Common JSON errors include unquoted object keys, single quotes instead of double quotes, trailing commas after the last array item or object property, and unescaped control characters inside strings.
Is my JSON data secure when using this tool?
The parsing, formatting, validation and minifying all happen in your browser, so your JSON is not sent to our server. Still, avoid pasting live passwords or secret keys into any online tool.