JSON validator & beautifier
Validate JSON content and make it look good.
About this tool
The JSON validator and beautifier checks whether JSON is valid and reformats it. Valid JSON is laid out neatly, with the indentation you choose, or minified onto one line. Invalid JSON gets an error that says what’s wrong and the line and column where it happened.
How to use the JSON validator
- Paste your JSON.
- Choose Beautify, 2 spaces, 4 spaces, tabs, or Minify.
- Read the result: formatted JSON marked as valid, or an error to fix.
Common JSON errors
- Trailing commas, as in [1, 2, 3,]. JavaScript allows them; JSON doesn’t.
- Single quotes. Strings and keys need double quotes: "name", not 'name'.
- Keys without quotes, like {name: "Ali"}, which is JavaScript, not JSON.
- Comments. JSON has no comments at all.
- Missing commas or brackets, often after copying part of a file.
When it’s useful
Reading an API response that arrives on one line, checking a config file such as package.json or composer.json before saving it, and making JSON smaller with Minify before sending it. Everything happens in your browser, so private data in the JSON stays on your device.
Similar tools
SQL formatter/beautifier
Format & beautify your SQL code with ease.
HTML entity converter
Encode or decode HTML entities for any given input.
BBCode to HTML
Convert forum style BBCode snippets to raw HTML code.
Markdown to HTML
Convert Markdown snippets to raw HTML code.
HTML tags remover
Easily remove all HTML tags from a block of text.
User agent parser
Parse the browser, engine, operating system and device from user agent strings.