Validate and format JSON.
This tool checks whether pasted text is valid JSON and, if it is, rewrites it neatly. It uses the browser's own JSON.parse, which follows the strict JSON standard. Validate & Format shows "Valid JSON" and prints the data with two-space indentation; Minify prints it on one line with all extra whitespace removed. If parsing fails, you see "Invalid JSON" followed by the browser's error message, which in most browsers includes a character position or a line and column. Everything stays in your browser.
Strict JSON is less forgiving than JavaScript. A trailing comma after the last item, single quotes instead of double quotes, keys without quotes, comments, and curly "smart" quotes pasted from a word processor all fail. So does an unescaped double quote inside a string, a frequent problem in hand-edited JSON-LD answers and descriptions. The wording of the error depends on your browser.
Two things to know about the output. If an object has the same key twice, the parser keeps only the last value, so the formatted version silently drops the earlier one. And very long integers beyond what JavaScript can represent exactly get rounded. Finally, valid JSON is not the same as valid structured data: this tool knows nothing about schema.org types or Google's required properties, so run JSON-LD through the Rich Results Test or the Schema Markup Validator as well.