SEO Tool
JSON-LD Script Generator
JSON-LD script wrapper snippet. Use it online on EasyTools99.
Tool area
Everything runs in the browser.
Reference results
| Input | Result |
|---|---|
JSON object = {"@context": "https://schema.org", "@type": "Organization", "name": "Neighbourhood Library"} | <script type="application/ld+json">
{"@context": "https://schema.org", "@type": "Organization", "name": "Neighbourhood Library"}
</script> |
JSON object = {"@context": "https://schema.org", "@type": "WebPage", "name": "Library Opening Hours"} | <script type="application/ld+json">
{"@context": "https://schema.org", "@type": "WebPage", "name": "Library Opening Hours"}
</script> |
JSON object = {"@context": "https://schema.org", "@type": "Book", "name": "Reading Guide"} | <script type="application/ld+json">
{"@context": "https://schema.org", "@type": "Book", "name": "Reading Guide"}
</script> |
JSON object = {"@context":"https://schema.org","@type":"Place","name":"Community hall"} | <script type="application/ld+json">
{"@context":"https://schema.org","@type":"Place","name":"Community hall"}
</script> |
JSON object = {"@context":"https://schema.org","@type":"WebSite","url":"https://example.com/en/"} | <script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebSite","url":"https://example.com/en/"}
</script> |
JSON object = {"@context":"https://schema.org","@type":"ImageObject","contentUrl":"https://example.com/media/reading-room.jpg"} | <script type="application/ld+json">
{"@context":"https://schema.org","@type":"ImageObject","contentUrl":"https://example.com/media/reading-room.jpg"}
</script> |
How it works
The generator puts your prepared JSON-LD body inside a script element with the application/ld+json type. It inserts the contents as supplied, so check syntax and meaning before publishing. Choose a type that describes what the reader can actually find on the page. The table uses small examples to show the wrapper, and a consumer may need additional properties for its own purpose.
Worked examples
- A library describes its organisation on its introduction page. The editor prepares an object with the public name, wraps it and checks the result against the heading readers see. Before publishing, she checks whether the theme already describes the library in structured data.
- A developer prepares the library hours page. He uses a WebPage object to test whether the publishing system preserves the wrapper. After saving, he reads the document source to verify that the editor has kept the script instead of displaying the JSON as text.
- A catalogue editor prepares a Book example for a title described in a reading guide. The fragment tests the publishing integration. She only adds bibliographic details after comparing them with the edition covered on the page.
Common mistakes
- Enter the JSON-LD body without an existing script wrapper. Adding an already wrapped fragment would nest the tags.
- Check quotation marks and trailing commas with a JSON validator before inserting the script.
- Look for other structured data on the page. Conflicting values for the same entity can leave consumers with an ambiguous description.
FAQ
Does the generator check the properties?
It wraps the supplied text. Validate the JSON syntax and the properties required by the consumer separately.
Can the body describe more than one item?
Yes, if its structure is already valid, for example through an @graph property. The wrapper preserves the body you enter.
Does the script guarantee a search feature?
Eligibility depends on the supported type, the properties, the public page and the consumer's rules. The script only provides a way to include the data.
