JSON Validator & Formatter
JSON Validator & Formatter
Validate and format JSON.
SEO Tools › Developer Utilities › JSON Validator & Formatter
Validate and format JSON. It runs in your browser: nothing you paste is uploaded, there is no account, and the tool is free. It is built and maintained by SEO ProCheck.
JSON Validator & Formatter
Finding the character that breaks your JSON
One misplaced character makes a whole JSON document unreadable, whether it is an API response, a config file or a block of JSON-LD in a page template. This page tells you in a click whether the text parses. It hands your input to the browser's standard JSON parser; on success it can pretty-print the result or squeeze it onto a single line, and on failure it repeats the parser's explanation. No server is involved.
Step by step
- Drop the JSON into the large text area. When checking structured data, strip the opening and closing script tags first.
- Press Validate & Format. A green message confirms the syntax, and an indented copy appears underneath.
- Press Minify instead when you want the smallest version, for example to embed in a template.
- When a red message appears, use the location it mentions, if any, to find the fault, correct it in the input, and run it again.
- Press Copy to grab the output.
What to watch for
The parser rejects anything the JSON standard does not allow, even if JavaScript would accept it: comments, trailing commas, single-quoted strings, bare keys, NaN, and typographic quotes that sneak in when copy passes through a document editor. Error wording differs between Chrome, Firefox and Safari, and some messages give a line and column while others only name the unexpected character.
Formatting is not a perfect round trip. Duplicate keys collapse to the final value without a warning, numbers too large for JavaScript's number type lose precision, and escape sequences such as é come back as the actual character. None of that matters for typical schema markup, but it can for data you pass on to another system. A green result also says nothing about vocabulary: a misspelled property name or a missing required field in JSON-LD is still perfectly valid JSON.
Questions people ask
Can it tell me if my schema markup is correct?
Only the syntax. Checking types and properties against schema.org, and against Google's rich result requirements, takes a structured data tester such as Google's Rich Results Test.
Why does my JSON-LD fail when I paste it with the script tag?
The script element is HTML, not JSON. The parser sees the opening angle bracket and stops. Paste only the object or array between the tags.
Does minifying JSON-LD help page speed?
It trims a few bytes of whitespace, which is rarely noticeable once the server compresses the page. Keep the readable version if your team edits the markup by hand.
Further reading: JSON-LD Structured Data: Complete Implementation Guide and Structured Data Validation Errors.
The same tool is also published on the static mirror at seoprocheck.github.io, and the rest of the set is on the free tools page.
