Skip to main content

Schema Markup Generator (JSON-LD)

Generate JSON-LD structured data for Article, FAQ, Product, Organization, LocalBusiness, HowTo, Recipe and Event.

Reviewed by · Last reviewed

Using the Schema Markup Generator (JSON-LD)

This schema markup generator emits JSON-LD for the eight schema types Google actually surfaces as rich results: Article, FAQ, Product, Organization, LocalBusiness, HowTo, Recipe, and Event. For type-specific guides with extra copy and examples, jump to the dedicated pages:

  1. Pick a schema type from the dropdown - Article, FAQPage, Product, LocalBusiness, HowTo, Recipe, Event, or BreadcrumbList. Each type exposes only the fields that are required or strongly recommended by Google for rich-result eligibility.
  2. Fill the required fields first - each required field is marked and the output block refuses to emit structured data until those are populated. Required varies by type: Article needs headline, author, and datePublished; Recipe needs recipeIngredient, recipeInstructions, and name.
  3. Add recommended fields - these are optional for valid markup but required for specific rich-result features. For example, Recipe needs aggregateRating to get star snippets.
  4. Inspect the live JSON-LD output - the right panel pretty-prints the generated block. The <script type="application/ld+json"> wrapper is included so you can paste directly into <head>.
  5. Copy and validate - paste into Google\'s Rich Results Test (search.google.com/test/rich-results) or the Schema Markup Validator at validator.schema.org to verify before shipping.

How JSON-LD Fits Into a Page

JSON-LD stands for JavaScript Object Notation for Linked Data and is specified in W3C Recommendation REC-json-ld-1.1 (July 2020). Unlike Microdata and RDFa, which interleave schema attributes with visible HTML, JSON-LD lives in its own <script> block decoupled from the rendered markup. Google has stated JSON-LD is its preferred format since 2015, for two practical reasons: it is easier to inject from server-side templates and CDNs without touching the body HTML, and it survives client-side DOM manipulation that would break inline microdata.

The schema vocabulary is defined at schema.org, a joint initiative of Google, Microsoft, Yahoo, and Yandex launched in 2011. Schema.org publishes a hierarchy of types (Thing at the root, branching into CreativeWork, Product, Place, Event, etc.) with typed properties on each. Google's rich-result documentation at developers.google.com/search/docs/appearance/structured-data is a filtered subset - only some schema.org types and properties actually unlock visual rich results in the SERP.

When Structured Data Earns Its Place

  • Recipe sites targeting Google's recipe carousel - the Recipe schema with aggregateRating and prepTime fields can tripe CTR for high-competition queries.
  • Local businesses trying to appear in the Map Pack - LocalBusiness schema with address, geo, openingHoursSpecification, and telephone feeds Google\'s local index.
  • E-commerce product pages aiming for merchant listings, price snippets, and review stars - Product + Offer + AggregateRating is the standard trio.
  • Blog archives wanting Article carousels - Article or NewsArticle with headline, image, datePublished, and author.
  • FAQ sections (carefully, since Google reduced FAQ rich-result eligibility in 2023 to "recognized government and health sites" only - worth noting before investing).
  • Events, job postings, courses, software apps - each has its own schema type with specific rich-result treatments documented in Google\'s gallery.

Edge Cases You Will Hit

  • Multiple @types on one page - combine them as an array: "@type": ["Article", "NewsArticle"] or emit separate <script> blocks. Either works; multiple blocks are easier to generate from templates.
  • Dates must be ISO 8601 - "2026-04-22T10:30:00+00:00". Common format errors: omitting the timezone, using MM/DD/YYYY, or using JavaScript\'s Date.toString() output.
  • Images must be reachable via absolute HTTPS URLs - and should be at least 1200x900 for best rendering. Relative paths and data: URIs fail silently in Google\'s parser.
  • Prices need both price and priceCurrency - "price": "19.99" without "priceCurrency": "USD" is invalid, and Google ignores the Offer entirely.
  • FAQ answers cannot contain promotional content - Google\'s policy explicitly forbids "advertising content" in FAQ acceptedAnswer bodies. Violations demote rich-result eligibility for the whole site, not just the page.
  • Mismatched data - structured data that claims "price": "9.99" while the visible page says $19.99 triggers Google\'s "structured data mismatch" manual action.

Schema.org and the Rich Results Contract

Schema.org\'s vocabulary is much larger than what Google actually surfaces. There are thousands of defined types, but only a few dozen drive visible SERP features: Article, BreadcrumbList, Event, FAQPage, HowTo, JobPosting, LocalBusiness, Organization, Product, Recipe, Review, SoftwareApplication, VideoObject, and a handful of industry-specific types. Bing supports a broadly overlapping set; Yandex and Baidu each have narrower lists. For every type, check Google\'s documentation first - that is the source of truth for what drives SERP outcomes.

Alternative Approaches

Hand-writing JSON-LD in your template works and gives the tightest control. CMS plugins (Yoast SEO, RankMath for WordPress; @astrojs/schema ecosystem for Astro; next-seo for Next.js) abstract schema generation behind type-safe APIs - worth it for sites that ship many content types, less useful for static landing pages. The Google Structured Data Markup Helper is a browser tool for marking up an existing rendered page by click-highlighting - good for one-offs, awkward for anything template-driven. This generator wins when you need a single page\'s schema generated in isolation, want to preview the JSON before committing template changes, or are teaching someone what each field maps to. Whatever you use, run the output through the Rich Results Test and Schema.org validator before merging.

Frequently Asked Questions

Is JSON-LD better than Microdata or RDFa?

For Google, yes. Google has publicly stated JSON-LD is its preferred format since 2015. The technical reasons: JSON-LD is in a separate script block so DOM changes do not break it, it is easier to inject from server-side templates, and it is self-contained as a machine-readable unit. Microdata and RDFa still work - Google parses all three - but JSON-LD is easier to maintain, validate, and generate programmatically.

Where in the HTML should the script block go?

Both <code>&lt;head&gt;</code> and end of <code>&lt;body&gt;</code> are valid per Google documentation. Head placement is conventional and slightly faster for Googlebot to find; body placement avoids bloating the head and can reduce time-to-first-byte if the schema is large. For very large schemas (3000+ lines of FAQPage or HowTo), body placement is worth considering.

Does schema markup directly boost rankings?

No. Google's John Mueller has stated this repeatedly - structured data itself is not a ranking signal. What schema does is make your page eligible for rich results (stars, carousels, expandable FAQs, recipe cards), which improve click-through rate substantially - sometimes 20-30% per internal Google case studies. The ranking comes from CTR as a weak indirect signal, not from the schema directly.

What is the difference between <code>Article</code> and <code>NewsArticle</code>?

<code>NewsArticle</code> is a subtype of <code>Article</code> intended for content published by news organizations with editorial standards, typically requiring <code>dateline</code> and potentially qualifying for Google News Publisher inclusion. <code>Article</code> is the generic type for any long-form written content - blog posts, guides, explainers. Use <code>BlogPosting</code> for blog-specific content, <code>NewsArticle</code> only if you are a news publisher, and plain <code>Article</code> for everything else.

Why did my FAQ rich results disappear?

Google restricted FAQ rich results in August 2023 to "well-known, authoritative government and health websites." Before that, nearly any page with valid FAQPage markup was eligible. Now most sites lose the rich-result treatment even though the markup remains valid. The markup is still worth adding (it may help with voice-search extraction and other non-visual uses), but expecting FAQ rich results on a commercial site is no longer realistic.

Can I nest schemas inside each other?

Yes, and you should. A <code>Product</code> with a nested <code>Offer</code>, a nested <code>Brand</code> as <code>Organization</code>, and a nested <code>AggregateRating</code> is standard. Nesting is how you build rich objects: the outer <code>@type</code> describes the main entity, inner objects use <code>@type</code> to describe their own sub-types without needing their own <code>@context</code>. The <code>@context</code> only appears once at the outermost object.

How often does Google recrawl my structured data?

Whenever Google recrawls the page - within hours for high-traffic pages, weekly or monthly for long-tail. To force an immediate recrawl, use Search Console's URL Inspection and click "Request Indexing." Changes typically appear in rich results 24-72 hours after recrawl.

Should the JSON-LD match the visible page content?

Yes, strictly. Google's structured data policies explicitly require that marked-up data accurately reflects what users see. Claiming <code>"price": "9.99"</code> while the page shows $19.99 is a policy violation that can trigger a manual action against the entire site. The same applies to <code>aggregateRating</code> (must reflect actual reviews), <code>availability</code> (must match on-page stock status), and FAQ answers (must match the visible copy).

What is the difference between <code>@id</code> and <code>url</code>?

<code>url</code> is the user-facing URL for the entity - where people go. <code>@id</code> is a machine identifier that Google uses to deduplicate references to the same entity across pages and datasets. Usually they are the same string, but you can use <code>@id</code> to point to an anchor or a fragment that identifies the entity within a larger page - for example, <code>"@id": "https://example.com/about#organization"</code>.

Can I use schema markup for images and videos?

Yes. <code>ImageObject</code> and <code>VideoObject</code> have dedicated rich-result treatments: image carousels, video thumbnails, and key-moment timelines. <code>VideoObject</code> with <code>contentUrl</code>, <code>thumbnailUrl</code>, <code>duration</code>, and optional <code>Clip</code> chapters is valuable for self-hosted video.

Does this tool send my data anywhere?

No. The generator builds the JSON-LD block entirely in your browser using pure JavaScript - input values go into an object, <code>JSON.stringify</code> with 2-space indentation produces the output, and that string is inserted into the preview. There is no network traffic and no telemetry. You can copy the output, paste it into Google Rich Results Test yourself, and verify externally.

What happens if I have invalid structured data?

Google logs it as an error in Search Console but does not penalize the page ranking-wise. The rich-result feature simply does not appear, and the page ranks normally on text relevance. Errors are a dropped feature, not a penalty.

More SEO & Web Tools