<script type="application/ld+json"> block—this tool will extract the JSON.
How to use
Use this tool to clean up Schema.org JSON-LD before adding it to your page.
- Paste your JSON-LD into the input (raw JSON or a full JSON-LD
<script>block). - Choose options (indent size, sort keys, try repair).
- Click Format or Minify.
- Copy or download the output, then place it inside
<script type="application/ld+json">...</script>.
FAQ
What input formats does this accept?
It accepts strict JSON (object or array) and also extracts JSON from a JSON-LD <script type="application/ld+json"> block.
Does this validate Schema.org rules?
It validates JSON syntax and shows basic signals like @context and @type; it does not perform full Schema.org or Google rich result validation.
What does “Try repair” do?
It attempts safe fixes like converting smart quotes and removing trailing commas, then parses again as strict JSON.
Should I sort keys in JSON-LD?
Sorting is optional; it can make diffs cleaner, but it does not change meaning for JSON-LD.
Can I output a ready-to-paste script tag?
Yes—enable “Wrap in <script>” to generate a complete JSON-LD script block.
Will this tool send my schema to a server?
No. Everything runs locally in your browser and the tool JavaScript does not make network requests.
Why is my JSON-LD still invalid after repair?
Some issues (like missing quotes around keys, comments, or single-quoted strings) are not valid JSON; fix those and format again.