JSON Formatter & Validator
Paste JSON, then format, minify, or check it for validity — with the exact error message when something's wrong.
How it works
This tool parses your input with the browser's native JSON parser. Format re-serializes it with readable indentation; Minify strips all non-essential whitespace. If the input isn't valid JSON, you'll see the parser's exact error (e.g. a trailing comma or an unquoted key) instead of a silent failure. Nothing you paste here is sent to a server — parsing happens entirely in your browser.
Common JSON mistakes this catches
- Trailing commas after the last item in an object or array (valid in JS, invalid in JSON).
- Unquoted or single-quoted object keys.
- Using
undefinedor a bare function instead ofnullor a string. - Comments (JSON has no comment syntax, unlike JSON5 or JSONC).