About the JSON Formatter & Validator
One missing comma or stray quote can make a JSON-LD script invalid, and search engines then ignore the whole block. This JSON formatter checks that your JSON is valid and, if not, points to the line and column of the error. Valid JSON can be beautified with indentation for reading, minified for production, sorted by key or explored in a collapsible tree view.
It is useful for structured data, API responses, configuration files and data exports. Note that this checks JSON syntax only; it does not check whether your schema.org properties meet Google's rich result requirements, so run valid JSON-LD through Google's Rich Results Test or the Schema Markup Validator afterwards. Everything runs in your browser, so pasted data stays on your device.
How to use it
- Paste your JSON or JSON-LD (with or without the script tags removed).
- Validate it and fix any error shown by line and column.
- Beautify, minify or sort keys as needed.
- Copy the result back into your page or file.
Frequently asked questions
Why is my JSON-LD invalid?
Common causes are trailing commas after the last item, single quotes instead of double quotes, unescaped quotes inside text, missing commas between properties and smart quotes pasted from word processors. The error position shown by the validator usually points at or just after the problem.
Does valid JSON mean my schema is correct?
No. Valid JSON only means the syntax is correct. The schema may still use wrong types, missing required properties or values that do not match the page. Test it with Google's Rich Results Test for rich result eligibility or the Schema Markup Validator for general schema.org checks.
Should I minify JSON-LD on my site?
It is optional. Minifying removes whitespace and slightly reduces page size, but search engines read formatted and minified JSON-LD equally well. Keeping it formatted can make it easier to maintain. If your CMS or plugin generates the JSON-LD, leave the formatting to it and focus on whether the values are accurate and match the visible page content.