How to format and validate JSON
- Paste a JSON object, array or primitive value into the input editor.
- Select two spaces, four spaces or tabs for indentation.
- Choose Format JSON, Minify or Validate only.
- Review the validation message, then copy or download valid output.
What valid JSON looks like
JSON uses objects, arrays, strings, numbers, booleans and null. Property names and strings must use double quotes. A comma separates items but cannot appear after the final item.
This validator follows the browser’s standards-compliant JSON parser. JSON5 features such as comments, single quotes and trailing commas are not accepted.
Formatting versus minifying
Pretty formatting helps during debugging, code review and documentation because nested values are visually grouped. Minification preserves the same parsed data while removing indentation and line breaks, which is useful when payload size matters.