How to Write JSON-LD Structured Data: Article, Product, BreadcrumbList and FAQPage
Last updated: · 9 min read
Structured data is extra information that describes a page in a form machines can read: this page is an article and this is its author; this page is a product and this is its price. The vocabulary comes from schema.org, and the most common syntax is JSON-LD (W3C JSON-LD 1.1), added to the page as a script block. Google uses structured data to decide whether a page is eligible for certain search result features, but markup alone guarantees nothing, and it has to match what visitors can see on the page. This guide explains how a JSON-LD block is put together, which fields are expected for the Article, Product, BreadcrumbList and FAQPage types, and the mistakes that come up most often. The lines in the worked example are real output from the JSON-LD Schema Markup Generator.
Formula
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "<type>",
"<property>": <value>
}
</script>
Input formats in the tool:
Article : one field: value per line
headline, author, datePublished, dateModified, image, publisher, url, description
Product : one field: value per line
name, description, image, brand, sku, price, currency, availability,
ratingValue, reviewCount, url
Breadcrumb (BreadcrumbList) : one Name | URL per line (only the last item may omit the URL)
FAQ (FAQPage) : Q: question followed by A: answer
Dates: ISO 8601 (2026-01-15 or 2026-01-15T09:30:00+03:00) Currency: ISO 4217 (USD, EUR, GBP)@context says the vocabulary in use is schema.org, and @type names the kind of thing being described. Everything else is a property of that type, and nested objects carry a @type of their own: the author is a Person, the publisher an Organization, the price information an Offer and the rating an AggregateRating. The tool builds this nesting from the flat lines you type: an author line becomes a Person object, a brand line becomes a Brand object, and the price, currency and availability lines are combined into one Offer object. Numbers are written without quotes, the currency code is upper-cased and the availability value is expanded to its full schema.org URL. Dates, URLs, numbers and currency codes are validated, and when a field Google expects is missing, a warning appears under the block. A </script> sequence inside your text is written with a JSON escape so that it cannot close the script block early.
What the inputs mean
- Schema type
- FAQ (FAQPage), Article, Product or Breadcrumb (BreadcrumbList). The format of the content field depends on the type you choose.
- Content
- For Article and Product, one "field: value" per line; author and image may be repeated, the other fields may appear once. For breadcrumbs, one "Name | URL" per line. For FAQ, a "Q: question" line followed by an "A: answer" line. An unknown field name is reported with its line number.
Worked example: Article markup for a blog post and Product markup for a product page
- Input (Article): headline: How to Bake Sourdough Bread; author: Jane Doe; datePublished: 2026-03-01T08:00:00+00:00; dateModified: 2026-03-10; image: https://www.example.com/img/sourdough.jpg; publisher: Example Kitchen; url: https://www.example.com/blog/sourdough. Each field goes on its own line.
- The output opens with <script type="application/ld+json"> and closes with </script>. The type and headline lines read "@type": "Article", and "headline": "How to Bake Sourdough Bread",
- Dates are kept exactly as typed: "datePublished": "2026-03-01T08:00:00+00:00", and "dateModified": "2026-03-10",
- The author line turns into a nested object: inside "author": { come "@type": "Person", and "name": "Jane Doe". The publisher is written the same way with the type "@type": "Organization",
- Two notes appear under the output for every type. Paste the code into the <head> or <body> of the page and validate it with Google's Rich Results Test. Structured data must match the content visitors can see on the page.
- If you enter only headline and author, the block is still produced, with two warnings added: Warning: a field recommended by Google is missing: image and Warning: a field recommended by Google is missing: datePublished
- Input (Product): name: Blue Cotton Shirt; image: https://www.example.com/img/blue-shirt.jpg; brand: Example Wear; sku: BCS-001; price: 29.90; currency: eur; availability: InStock; ratingValue: 4.6; reviewCount: 128; url: https://www.example.com/products/blue-shirt.
- The price lines are gathered into a single Offer object: "priceCurrency": "EUR", and "price": 29.9, together with "availability": "https://schema.org/InStock". Note that eur has been upper-cased, 29.90 is written as the number 29.9 and InStock has become a full schema.org URL.
- The rating is a separate AggregateRating object: "ratingValue": 4.6, and "reviewCount": 128
- Leave out the currency and a warning appears: Warning: price and currency must be given together. Enter nothing but the product name and you get: Warning: a product rich result needs at least a price or a rating (ratingValue and reviewCount).
- The breadcrumb input has three lines: Home | https://www.example.com/, Blog | https://www.example.com/blog and Sourdough Bread without a URL. Items are numbered in order, and the last one is written as "position": 3, and "name": "Sourdough Bread", with no item property.
- When the text contains </script>: the answer "Write </script> at the end." appears in the block as "text": "Write <\/script> at the end.". The backslash is a valid JSON escape, so a parser reads the same text back, but the browser does not end the block early.
- Format errors are reported without producing a block. With the date written as 01.03.2026: Line 2: invalid date. Use ISO 8601 (example: 2026-01-15 or 2026-01-15T09:30:00+03:00). With the currency written as euro: Line 3: the currency must be a three-letter ISO 4217 code (example: USD, EUR, TRY).
Result: The Article input produces a block carrying the lines "@type": "Article", "headline": "How to Bake Sourdough Bread", with the author as a Person and the publisher as an Organization. In the Product input, the price sits inside the Offer as "price": 29.9, "priceCurrency": "EUR", and the rating inside the AggregateRating as "ratingValue": 4.6, "reviewCount": 128
🧩 JSON-LD Schema Markup Generator
Free, no sign-up; your data stays in your browser.
Open the calculator →How to read the result
The rule that matters most is that everything you mark up must also be visible to visitors on the page. Google's structured data guidelines tell site owners not to mark up content that readers cannot see and require the markup to be a true representation of the page; a page that breaks the rules can receive a manual action and lose its eligibility to appear as a rich result. The same document states that even correct structured data is not guaranteed to show up in search results. Expectations differ by type. For Article, Google's documentation lists no required properties; headline, image, datePublished, dateModified and author are recommended. For Product, name is required and at least one of review, aggregateRating or offers must be present. A BreadcrumbList must contain at least two items, and if the last item has no item property, Google uses the URL of the page itself. FAQPage remains a valid schema.org type and the tool still generates it, but according to Google's documentation changelog the FAQ rich result has not been shown in Google Search since 7 May 2026, and the documentation for the feature was removed in June 2026. Before you publish the code, check it with Google's Rich Results Test; the tool validates format only and cannot compare the markup with the content of your page.
Common mistakes
- Marking up information that is not on the page. Putting a rating, a price or a question and answer into JSON-LD when visitors cannot see it goes against Google's guidelines.
- Updating the page and forgetting the JSON-LD. When a price or stock status changes and the block keeps the old value, the markup contradicts the visible content.
- Assuming structured data makes a rich result certain. Markup only makes a page eligible; the search engine decides whether to show anything.
- Expecting FAQPage markup to produce FAQ rich results on Google. The feature was withdrawn from Google Search in May 2026.
- Writing dates in a local format. 01.03.2026 and 1 March 2026 are not valid; ISO 8601 (2026-03-01) is required, and a time needs a time zone.
- Adding a currency symbol or thousands separator to the price. price is a bare number (1299.90); the currency is given separately as a three-letter code (USD).
- Giving only one of ratingValue and reviewCount, or a rating above 5 without stating the scale. The tool warns in both cases; for another scale, bestRating has to be added by hand.
- Dropping a comma or a quote while editing the code by hand. One syntax error invalidates the whole block, so test again after every change.
Frequently asked questions
Where does the JSON-LD code go on the page?
According to Google's documentation, JSON-LD can sit in a script tag in either the head or the body of the HTML page, and Google can also read JSON-LD that is injected into the page with JavaScript. The block has no effect on how the page looks.
Should I use JSON-LD or Microdata?
Google supports three formats: JSON-LD, Microdata and RDFa. Its documentation says it recommends JSON-LD where the site's setup allows it. The practical advantage of JSON-LD is that it is added as one block without touching the HTML tags around your content.
Does structured data improve rankings?
This guide makes no such promise. Google's documentation describes structured data as a condition for a page to be eligible for particular search features, and adds that appearance is not guaranteed.
Are FAQ rich results still shown?
Not in Google Search. An entry dated 8 May 2026 in Google's documentation changelog says the feature would no longer appear from 7 May 2026, and an entry dated 15 June 2026 records the removal of its documentation. FAQPage is still a valid type in the schema.org vocabulary.
Which fields are required for Article?
Google's Article documentation says there are no required properties and asks you to add those that apply to your content. The recommended ones are author (the name and, where available, the URL of an author page), dateModified, datePublished, headline and image. The tool warns when headline, image, datePublished or author is missing.
What is the minimum for Product markup?
According to Google's product snippet documentation, name is required and one of review, aggregateRating or offers must be present. Inside offers the price is required and the currency is recommended. The tool asks for price and currency together and warns when both a price and a rating are missing.
How do I test that the code is correct?
Google's Rich Results Test checks code you paste in, or a live URL, and shows which result types the page is eligible for. It verifies syntax and fields; confirming that the markup matches the visible content is still up to you.
The result is not exact or binding and is for information only; it is not an official document and cannot be used in official procedures. Confirm it with the competent authority or a professional before acting; no liability is accepted for losses arising from its use.
Sources
- W3C — JSON-LD 1.1, section 7: Embedding JSON-LD in HTML Documents
- Schema.org — Article type
- Schema.org — Product type
- Schema.org — BreadcrumbList type
- Schema.org — FAQPage type
- Google Search Central — General structured data guidelines
- Google Search Central — Introduction to structured data markup (formats, placement of JSON-LD)
- Google Search Central — Article structured data
- Google Search Central — Product snippet structured data
- Google Search Central — Breadcrumb (BreadcrumbList) structured data
- Google Search Central — Documentation updates: deprecating the FAQ rich result feature (May 2026)