Structured data
JSON-LD Minifier and Prettifier
Indent JSON-LD for reading or compress it for your page, with every number and string copied exactly as written.
Runs in your browser; nothing is uploaded. · Free, no account · 2 min
Comments and trailing commas are errors, because Google reads JSON-LD as strict JSON.
Importing a saved run into your account is coming soon. Until then, your last runs stay in this browser only, and you can download your files.
How to use
- Paste the JSON-LD, or a page that contains script tags.
- Choose Prettify or Minify, and the indent for prettifying.
- Decide whether to wrap the result in a script tag and escape the less-than sign.
- Copy the result, or press swap to go back the other way.
What it checks and how it works
The tool parses the input as strict JSON with the jsonc-parser library, the way Google reads JSON-LD (RFC 8259), and prints it again from the parse tree. Numbers and strings are copied exactly as you wrote them, so a 14-digit GTIN or a long identifier is not rounded the way JSON.parse followed by JSON.stringify would round it. Key order is kept.
Comments and trailing commas are reported as errors with a line and column, because they are not valid JSON. Escaping the less-than sign writes it as the six characters \u003c inside strings, so a string can never close the script tag early; the meaning of the data does not change. The tool does not check types or properties, and it does not sort keys or fix invalid JSON for you: use the JSON-LD checker for that.
Sources
- W3C: JSON-LD 1.1 opened 29 Oct 2026
- RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format opened 29 Oct 2026
- Google Search Central: Intro to how structured data markup works opened 29 Oct 2026
Related tools
JSON-LD Syntax and Required-Property Checker
Paste JSON-LD, or a whole page, and see syntax errors with line numbers plus missing required and recommended properties for each Google type.
Microdata, RDFa and JSON-LD Detector
Paste a page's HTML and see every item of structured data in all three syntaxes, with its type, properties, line number and gaps.
Questions
About this tool
No. The tool removes only whitespace. Numbers and strings are copied exactly as written and the key order is kept.
They round numbers that do not fit a double, such as a long GTIN written as a number. This tool prints the original text of every value.
It writes the character as an escape sequence inside strings, so text like a closing script tag cannot end the block early. A JSON reader sees the same data.
Get started today
Find out where your brand stands in AI. Free.
Run a free AI visibility analysis on your domain. No credit card, results in minutes. See what AI engines say about your brand today.
Brands already measuring their AI visibility with Zaher.


