What JSON-LD is
Structured data describes what a page is about in a vocabulary search engines share, schema.org (opens in a new tab). JSON-LD writes it as JSON inside a <script type="application/ld+json"> element, apart from the visible HTML, which is why Google recommends it: you can add or change it without touching the page's layout. Microdata and RDFa say the same things with attributes on the visible elements, which ties them to the template.
The generator writes JSON-LD for four types: an article, an organization, an FAQ and a breadcrumb trail. It leaves out empty fields, checks what Google's documentation asks for, and escapes every < in your text, so a value such as </script> can't end the element early.
How to add schema markup to a page
- Choose the type: Article for a news story or a blog post, Organization for the site's owner, FAQ for a page of questions and answers, Breadcrumb for the path to the page.
- Fill in the fields. Required ones are needed for the markup to say anything; recommended ones are those Google asks for.
- Fix the problems listed under the form: no markup is written while one is an error.
- Copy the script element, or download the JSON-LD as a
.jsonldfile. - Paste the script into the page's HTML, in the head or the body, and publish.
- Test the published page with the Rich Results Test, or the code with the Schema Markup Validator.
Examples
Input
type=BreadcrumbList
item=Home | https://example.com/
item=Blog | https://example.com/blog/
item=First post | https://example.com/blog/first-post/
Output
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://example.com/"
},
{
"@type": "ListItem",
"position": 2,
"name": "Blog",
"item": "https://example.com/blog/"
},
{
"@type": "ListItem",
"position": 3,
"name": "First post",
"item": "https://example.com/blog/first-post/"
}
]
}
</script>
Input
type=FAQPage
question=How do I close a script tag?
answer=Write </script> after the code.
Output
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "How do I close a script tag?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Write \u003c/script> after the code."
}
}
]
}
</script>
Input
type=Article
headline=How we cut our API latency in half
datePublished=2026-10-01
Output
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How we cut our API latency in half",
"datePublished": "2026-10-01"
}
</script>
The article has no image. Google can show an image of the article in results and Discover: give the URL of one or more, one per line. (SCHEMA_RECOMMENDED_MISSING)
The article has no date modified. Give the date it last changed, or the date published if it never did. (SCHEMA_RECOMMENDED_MISSING)
The article has no author. Give the author's name, and the URL of a page about them. (SCHEMA_RECOMMENDED_MISSING)
Which types still change Google results
Valid markup makes a page eligible for a rich result; Google decides whether to show one for each search. As of October 2026:
- Breadcrumb markup can replace the URL in a desktop result with the page's path, such as
example.com › Blog › First post. Google needs at least two items, and the last one may leave out its URL, since it is the page itself. - Article markup helps Google show the right title, image and dates for a story in its results. Google requires no field, and recommends a headline, images, the dates and the author with a URL.
- Organization markup on the home page or an about page tells Google the official name, logo, profiles and contact details it can use in results and knowledge panels.
- FAQ markup no longer shows anything in Google Search: FAQ rich results ended on May 7, 2026, and Google removed its FAQ guide. The markup is still valid schema.org, and other services may read it.
Rules every markup must follow
Google's general structured data guidelines (opens in a new tab) apply to every type. The markup must describe what the page shows: an FAQ whose answers aren't on the page, or an organization that isn't the site's owner, is misleading. Don't add reviews or ratings that aren't real, and don't mark up content to rank for something the page isn't about. A page that breaks these rules can lose its rich results through a manual action, even with markup that validates.
Check before you publish
The Rich Results Test (opens in a new tab) shows which Google rich results a page or a code snippet is eligible for, and what stops it; it no longer reports FAQ. The Schema Markup Validator (opens in a new tab) checks any schema.org markup against the vocabulary, whatever Google does with it. The generator sends nothing to either: paste the code or the page's URL there yourself.
Options
| Option | Values | Default | When to change it |
|---|---|---|---|
| Type | Article, Organization, FAQ, Breadcrumb | Article | The schema.org type to write: Article (with NewsArticle and BlogPosting), Organization, FAQPage or BreadcrumbList. |
| Script tag | On, Off | On | Shows and copies the JSON-LD inside its script element, ready for the page's HTML; off, the JSON-LD alone. Download always saves the JSON-LD. |
Common errors and fixes
| Code | What it means | How to fix it |
|---|---|---|
SCHEMA_Error | Something the markup can't do without is missing: an article's headline, an organization's name or URL, a question or its answer, a breadcrumb item's name, the URL of an item before the last, or a second item in the trail. | Fill in the field the problem names. |
SCHEMA_Warning | A field Google recommends is empty, such as an article's image or author, or an organization's logo. | Add it if the page shows it; the markup is valid without it. |
SCHEMA_Error | A URL is relative, has spaces, or isn't a web address, like javascript: or data:. | Write the full address, starting with https://. |
SCHEMA_Error | A date isn't in ISO 8601 form, or doesn't exist; as a warning, a time without its time zone. | Write 2026-10-27, or 2026-10-27T09:00:00+03:00 with the offset from UTC. |
SCHEMA_Warning | The FAQ asks the same question twice. | Keep one of them, as the page should. |
INPUT_Error | A field is longer than 5,000 characters, the FAQ has more than 50 questions, or the trail more than 20 items. | Shorten the text, or keep the questions and steps that matter. |