Paste your JSON to format it with proper indentation, or minify it to a single line. Also validates JSON syntax.
Google AdSense Banner
This area will contain advertisements after approval.
Google AdSense Banner
This area will contain advertisements after approval.
This tool parses your JSON text to check it's syntactically valid, then re-outputs it in your chosen format. 'Format' (also called beautify or pretty-print) adds indentation and line breaks so nested objects and arrays are easy to read visually. 'Minify' strips all unnecessary whitespace to produce the smallest possible file size, commonly used for production API responses.
A JSON validator like this one flags common mistakes such as missing commas between properties, unquoted property names, trailing commas after the last item (not allowed in strict JSON), and mismatched or missing brackets and braces, all frequent causes of a 'invalid JSON' error when working with APIs or config files.
'Format' on the compact input {"name":"Alice","age":30} produces the pretty-printed version, with "name" and "age" each on their own indented line inside the braces. Running 'Minify' on that pretty-printed version collapses it straight back down to {"name":"Alice","age":30}, with all extra whitespace and line breaks removed, the two operations are exact inverses of each other for valid JSON.
Leaving a trailing comma after the last item in an object or array, standard JSON (unlike JavaScript object literals) does not allow trailing commas, this is one of the most common causes of an 'invalid JSON' error.
Using single quotes around strings or property names, JSON requires double quotes exclusively, single-quoted strings that work fine in JavaScript will fail strict JSON parsing.
Including comments in the JSON, standard JSON has no comment syntax, // or /* */ comments that are valid in JSONC or JS config files will cause a parsing error here.
The tool will show an error message describing that the JSON has a syntax issue, such as a missing comma, bracket, or quotation mark.
No, all formatting and validation happens entirely in your browser. Your data is never transmitted or stored.
Format adds indentation and line breaks for readability, while minify removes all unnecessary whitespace to reduce file size.
Google AdSense Banner
This area will contain advertisements after approval.