What JSON-LD Markup Does
JSON-LD is a way to attach machine-readable facts to a page. It sits in a script element with the type application/ld+json, so browsers do not display it, and it uses the schema.org vocabulary to name the kind of thing being described. A product, an article and a list of questions each have their own type with their own properties.
Search engines read these blocks alongside the visible page. Some use them to build display features, and others use them only to understand the page. Valid markup does not guarantee eligibility, and the rules change over time, so treat markup as an accurate description rather than a way to force a result.
This generator builds one block at a time. Each type has required fields, which the checks treat as blocking problems, and optional fields that appear in the output only when you fill them in. Empty optional values are left out so the block stays clean.
Choosing the right type matters more than the fields. A product page that also lists questions can carry both a Product block and an FAQPage block, but each block must describe content that actually appears on that page. The generator builds one type at a time, so you create one block per type and place each beside the content it describes.
Type-by-Type Walkthrough
- Choose the type. The hint under the selector explains what the type describes. Switching types keeps the values you entered for the others, so you can return without retyping.
- FAQPage. Enter a question and an answer for each pair, up to 30 pairs. A pair with only one side filled in is flagged as a required problem, and a pair left completely empty is ignored. Answers are written as plain text, so they should match what visitors read on the page.
- Article. Enter the headline, author name and date published. Date fields produce a plain year-month-day value. Date modified is optional, and if it comes before the publish date the checks warn you. The image URL must start with https:// or http://, and the description is optional.
- BreadcrumbList. Enter the levels from the top of the trail downward, and use the move buttons to reorder them. Each level needs a name and a full URL. Position numbers are assigned from the order you choose, starting at 1.
- Product. Enter the name and a price as a plain number with up to two decimals, such as 24.50, with no currency symbol. Choose the currency code and availability. The price and currency sit inside an offers object, and availability is written as a schema.org address.
- Wrap, copy or download. With the wrap option checked, the output includes the script element. Copy and Download stay disabled until every required field is valid.
The checks use three levels. A required problem blocks copying and downloading until it is fixed. A warning leaves the output available but names something worth reviewing, such as a modified date earlier than the published date, or an article without an image. A note appears with every output as a reminder that markup should describe visible content.
Worked Example: A Product Block
With the sample product loaded and the wrap option on, the generator writes this block:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Ceramic Pour-Over Dripper",
"description": "Single-cup dripper with a matte glaze and a two-hole base.",
"image": "https://www.example.com/images/dripper.jpg",
"offers": {
"@type": "Offer",
"price": "24.50",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
}
}
</script>
Walk through it. The name and description come from their fields. The image line appears only because an image URL was entered. The price stays the string 24.50, so the decimal is kept exactly as typed, and the currency is USD. The availability choice InStock becomes the schema.org address for in stock. If the image field were empty, the image line would simply be absent. If the price were typed as $24.50, the checks would report a required problem, because the currency symbol breaks the plain-number format.
Changing the availability choice to Out of stock would change only the last value, which becomes https://schema.org/OutOfStock. Every other line stays the same, so you can compare two versions of the block at a glance.
Accuracy Tips and Common Mistakes
- Mark up only what is visible. Markup that describes content visitors cannot see is a common reason for structured data to be ignored.
- Keep FAQ answers consistent with the page. The answer text should match the answer readers see, word for word where possible.
- Use full URLs. The checks reject relative image and breadcrumb addresses, because the markup can be read outside your site.
- Keep dates honest. Use the real publish date, and change the modified date only when the content changes.
- Do not invent ratings, reviews or stock levels. Availability should reflect what you actually sell.
- Test the finished block with a structured data testing tool after you paste it into a page, because this generator cannot see your page.
- Keep prices in the markup in step with the page. A price that changes on the page but not in the block is a mismatch the generator cannot detect.
- Edit the output by hand with care. The generator uses two-space indentation, so a later change to one value shows up as a small, easy-to-read difference.
Frequently Asked Questions
Google has said it prefers JSON-LD because it stays separate from the visible HTML. The other formats still work, but JSON-LD is easier to keep in one block and to change without touching the page layout.
A value containing the less-than sign followed by a slash and the word script would end the block early. Writing the sign as a Unicode escape keeps the JSON valid, and parsers read it back as the same character.
A single block can hold several objects, but this generator builds one type at a time. Create one block per type and place each where it belongs on the page.
The key is removed from the output, so optional values never appear as empty strings. Required fields are always included, and the copy and download buttons stay disabled while one is missing.