JSON-LD Schema Markup Generator
Operator: Abdulla Al Fahad. How tools are built and checked
JSON-LD is the block of schema.org data a page carries in a script tag so search engines can read what the page is about: the headline and date of an article, the price and stock of a product, the opening hours of a shop. This tool writes that block for nine schema.org types from plain form fields, and it can also read an existing block back and say what is wrong with it.
Every step runs in the open tab. Nothing is posted anywhere, so a launch date that is still provisional or a price that has not been agreed can be checked without being stored on a server. The page keeps no saved state either, so a reload starts clean.
Key features
- Nine schema.org types with forms written for each, including the business subtypes and the availability, condition and event-status values
- Timestamps with an optional time and a UTC offset, and durations built from hours and minutes
- Several items combined into one @graph, with breadcrumb positions numbered for you
- Script output with no < character in it, so a closing tag or a comment marker inside a value cannot end or hide the element, and a plain JSON download
- A checker for pasted JSON or a whole page, with every script in the page reported separately and the line of each one
- Findings grouped as invalid, required for rich results, recommended and notes, so a missing recommendation is never presented as an error
Required versus recommended properties per type
The generator covers Article (with NewsArticle and BlogPosting as subtypes), FAQPage, Product, LocalBusiness, which takes 38 specific business types from Restaurant to Locksmith as well as the general LocalBusiness type, Organization, BreadcrumbList, Event, HowTo and Recipe. HowTo is included because its markup is valid schema.org, although Google no longer shows it. Each type has its own form. Dates take a calendar date, an optional time and a UTC offset chosen from a list, which the tool joins into a timestamp such as 2027-06-12T19:30:00+02:00. Durations are typed as hours and minutes and written as ISO 8601, so 1 hour 20 minutes becomes PT1H20M. Recipe totals are added up from prep and cook time when no total is typed.
The output is pretty-printed JSON inside a script element with type application/ld+json, using two-space indentation. Every < in the output is written as the JSON escape \u003c, which reads back as the same character, so the output holds no < at all. A value such as </script> or <!-- inside a question cannot end the element early or leave it unclosed. U+2028 and U+2029 are escaped too. Several items on one page are combined under a single @context in an @graph array. The page allows up to 20 items, and each repeating list (FAQ questions, breadcrumb levels, steps and so on) allows up to 100 rows.
The checker takes JSON, or the HTML of a whole page, in which case every script of type application/ld+json is read and reported by its line number. Each block is parsed first; a syntax error shows the line and column where JSON parsing stopped. Parsed blocks are checked for the properties Google asks for, in three levels: invalid values, properties required for rich results, and recommended properties. Values are checked for format: dates must be ISO 8601, durations must be ISO 8601 durations, URLs must be absolute, prices must be plain numbers with no currency sign, currencies must be three-letter ISO 4217 codes, availability and event status must be schema.org URLs or known names, and GTINs must have a valid check digit. The required and recommended fields come from a rule table in the code that cites Google's Search Central pages, and that table is the part to re-check whenever Google updates those pages.
How it works
Each form becomes a plain object with fields that have values. Empty fields are left out entirely, including empty lists and objects that would contain nothing but a type, so a Product with no reviews does not get an empty review property. Numbers typed as plain decimals become JSON numbers, so a rating of 4.6 is written as 4.6 and a price of 89.00 as 89, while anything else, such as $89, stays as text so the checker can flag it.
The checker walks each parsed block. For each type it looks up the rule table, then applies two kinds of rule. Plain rules say a property is required or recommended, and a dotted rule such as author.name is only checked when author is present. Either-or rules say a Product needs at least one of offers, review or aggregateRating, and an Offer needs price or priceSpecification. Format checks run on every property whose name has a known meaning, such as datePublished for dates or latitude for coordinates, wherever it appears in the block.
Some checks look at the whole block rather than one property. A breadcrumb trail is checked so that every level except the last has a URL, and its positions run 1, 2, 3 in order. A recipe with prep time but no cook time is flagged, because Google asks for the two together. A FAQ page with an empty question list is flagged as required.
Typical uses
- Adding Product markup to a small online shop's product pages, with the price in a currency code and availability as a schema.org URL
- Marking up a dentist's or a bakery's home page with the business subtype, opening hours on two rows, and coordinates for the map pin
- Checking the structured data a CMS theme produces for a blog post before a rich-result test, by pasting the HTML of the live page
- Writing an Event entry for a webinar that runs in one time zone but is watched from many, with the start written with its UTC offset
- Building a recipe page's markup from a cookbook entry, with prep and cook times converted to ISO durations
Building one
- Choose the schema type for the first item. The form below it changes to the fields that type takes, and a note appears when Google's support for that type is limited.
- Fill in the fields. Use Load example to see how a filled-in form looks before replacing the sample text.
- Add more items for the same page if you need them. Their markup is combined under one @context.
- Read the checks listed under the output. Fix anything invalid first, then the required items, and decide about the recommended ones.
- Copy the script tag and paste it into the head or body of the page, or download the JSON if your template adds the script tag itself.
- To check a page that already has markup, switch to Check existing markup, paste the JSON or the page's HTML, and choose Check markup.
Example
A breadcrumb trail of three levels, the last one without a URL
Books > Science fiction > Award winners
URLs: https://example.com/books and https://example.com/books/sciencefiction; the last level has noneThe script tag the tool writes
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Books",
"item": "https://example.com/books"
},
{
"@type": "ListItem",
"position": 2,
"name": "Science fiction",
"item": "https://example.com/books/sciencefiction"
},
{
"@type": "ListItem",
"position": 3,
"name": "Award winners"
}
]
}
</script>Tips for best results
- Write the price as digits with a dot, such as 89.00, and put the currency in its own field. Google reads the price from the number and the currency from the code.
- Give every date a time and an offset when the time matters. A date with no offset leaves the time zone open, and the checker says so.
- Make the image URL the same one the page shows. Google expects markup to describe what visitors see, so a placeholder image in the markup works against you.
- Use the Check existing markup mode on the page's live HTML after any template change. Themes and plugins often add a second, conflicting block of JSON-LD beside yours, and the checker lists every block so you can see both.
- For a product with several sizes or colours, use one Product per page and one Offer for the price shown, rather than listing every variant in one block.
Things to check before you rely on it
Valid markup does not guarantee a rich result, and Google decides whether to show one. Its FAQ documentation says FAQ rich results no longer appear in Google Search, and Google stopped showing HowTo rich results in 2023. A valid FAQ or HowTo block is still valid schema.org that other tools can read, but it will not produce a result card. A check that passes means the block is well formed and has what Google asks for, not that the page will look different in results.
The checker covers the properties in its rule table and the value formats above. It does not validate every schema.org property, does not fetch the page to compare the markup with the visible text, and does not know about the spam policies that can stop a page from appearing.
Google changes its requirements without much notice. The rule table in this tool was checked against Google's Search Central pages on 2026-11-15 and is not re-read on each release, so a rule can lag behind. Before acting on a warning that names a required property, open the matching Search Central page and compare.
Markup must describe what the page shows. Reviews, ratings, prices and FAQ answers that are not visible to visitors can get the markup ignored or the site penalised, so copy the values from the page rather than from memory.
A value containing a line break inside a field such as the FAQ answer is written as JSON text with the line break escaped. Google may show it flattened, so keep answers short and plain.
Best practices
- Put the JSON-LD for the page's main subject on that page only; a breadcrumb trail on every page is fine, but a Product block copied onto category pages is not.
- Keep the names and headlines the same as the visible headings, and dates in the markup the same as the dates shown on the page.
- Use the most specific LocalBusiness subtype that fits, such as Dentist or Bakery, and fall back to LocalBusiness only when none does.
- Save the generated markup in your version control next to the template, and run the checker again when the template changes.
What a passing check does and does not establish
The checker sees the JSON it is given and nothing more. It cannot tell whether 89.00 is the price the shop charges today, whether the reviews in the markup came from customers, or whether the opening hours match the door. Those facts live on the page and in the business's records, so a green result means the block is well formed and carries the fields Google asks about, not that its contents are true.
Two things look like checks but are not. A GTIN passes when its check digit is right, which catches a mistyped barcode but not one that belongs to a different product. A brand, an MPN or a SKU is never looked up in any registry, and an address on a LocalBusiness is not geocoded to confirm the coordinates beside it.
Where the text you type is processed
The generator and the checker are plain script in the page. Neither sends a request, and nothing is saved in the browser, so closing the tab clears them. That suits a page that is not live yet, such as an event whose date is still provisional or a product whose price is still being negotiated.
The copy and download buttons work from the same in-memory text as the preview, so the file you save is exactly what you see on screen.
Frequently asked questions
Will a valid FAQ block show questions in Google results?
Not in Google Search. Google's FAQ documentation says the rich result no longer appears there. The markup is still valid schema.org, and other tools can read it, so the checker still reports on it.
Can I check markup without publishing the page?
Yes. Paste the JSON or the HTML of the page into Check existing markup, or generate the block and check the output below the form. Nothing is sent anywhere, so the check works on drafts.
What does the Check existing markup mode read from an HTML page?
Every script element whose type attribute is application/ld+json, with either quote style. Other scripts are ignored. Each block is listed with its line number, so a page with two blocks shows two sections.
Why is my price flagged when it looks right?
The checker wants a plain number such as 89.00. A price with a currency sign, a thousands separator or a comma as the decimal mark is written as text and flagged. Put the currency in the priceCurrency field.
Where do I test the result on Google's side?
Use Google's Rich Results Test on the live URL, or paste the code into it. It shows what Google can read from that page and any errors it reports for the rich results it supports.