Schema Markup Made Simple: How to Write Valid JSON-LD
What structured data is, which schema types still earn rich results in Google, and how to build and validate JSON-LD for products, recipes and jobs.

Schema Markup Made Simple: How to Write Valid JSON-LD
Structured data is a short, machine-readable description of what a page contains. Instead of guessing from the text that a page sells a mug for $12.50 that is in stock, a search engine can read it directly. Google, Bing and many other services use this data for rich results, knowledge panels and, increasingly, AI answers. This guide explains the basics and shows how to create correct markup with the free schema markup generator.
JSON-LD in one paragraph
There are three formats for structured data: JSON-LD, Microdata and RDFa. Google recommends JSON-LD because it lives in one script block instead of being woven through your HTML. It looks like this: a script element with the type application/ld+json, containing an object with "@context": "https://schema.org", an "@type" such as "Recipe", and properties such as "name", "image" and "cookTime". You can place it in the head or the body of the page.
Required, recommended and invalid
Google's documentation lists, for each rich result type, which properties are required and which are recommended. Missing a required property makes the page ineligible for that feature. Missing recommended properties keeps it eligible, but the result may be plainer. A third class of problem is invalid values, and these are the most common mistakes in hand-written markup:
- Prices with symbols, such as "$12" instead of 12 or 12.50.
- Currencies that are not three-letter ISO 4217 codes (USD, EUR, GBP).
- Durations in words, such as "20 minutes", instead of ISO 8601 format (PT20M; one and a half hours is PT1H30M).
- Dates in local formats like 02/11/2026 instead of 2026-11-02, and event times without a time zone offset.
- Ratings above the best rating, or a review count of zero.
The generator converts minutes to ISO durations, upper-cases currency codes, keeps prices numeric and flags each of these problems as you type.
Which types are worth adding
Product markup can show price, availability and review stars. A product needs a name and at least one of an offer, an aggregate rating or a review. Recipe markup powers recipe carousels and needs a name and image; times, ingredients, steps and ratings are recommended. Event markup needs a name, a start date and a location, either a place with an address or an online URL. JobPosting markup feeds Google's job search and needs a title, description, posting date, employer and a location, or remote-work details. LocalBusiness needs a name and address, and benefits from opening hours, phone and coordinates. Article has no required properties, but headline, images, dates and author help Google understand the page.
Two types changed in 2023. FAQ rich results are now shown only for authoritative government and health sites, and how-to rich results were removed from Google. Both remain valid schema.org vocabulary, which other search engines and AI tools read, so they are still useful, just not for Google's visual features.
Building markup step by step
- Choose a type and fill in the required fields, marked in red.
- Add recommended fields that are true and visible on the page.
- Add list items such as FAQ questions, recipe steps or opening hours.
- Read the errors and warnings and fix them until the list is clear.
- Copy the script tag into your page, or combine several items into one @graph.
- Test the live URL with Google's Rich Results Test and the Schema.org validator.
Rules that keep you safe
Structured data must describe content that visitors can see. Marking up reviews that are not on the page, prices that differ from the visible price or events that have been cancelled can lead to a manual action, which removes rich results for your site. Keep markup in sync with the page: if your CMS changes the price, the JSON-LD must change too. Do not add LocalBusiness review stars for reviews you collected about yourself, because Google treats those as self-serving.
Checking markup you already have
Plugins and themes often add structured data automatically, and sometimes it is outdated or duplicated. Paste a page's source into the checker tab and every JSON-LD block is parsed and validated with the same rules, including blocks that fail to parse because of a missing comma or quote.
Limits
The generator checks the properties and formats that most often cause problems, based on Google's documentation for each type, but it does not reproduce every rule Google applies, and it does not read Microdata or RDFa. Valid markup makes a page eligible for a rich result; it does not guarantee one, because Google also considers content quality, policies and the search itself. Always confirm with Google's own testing tools and Search Console reports after publishing.



