Skip to main content

View Latest

New Delhi31°C
Markup, feeds and tagged links

Schema markup generator

Schema markup generator

Build JSON-LD for a website, an organisation, an article or a breadcrumb trail from fields you fill in, with the properties each type requires present before the block is written.

How this is calculated

A JSON object is built with @context set to https://schema.org and @type set to the type you chose, then serialised with the values escaped by the JSON encoder. Properties your fields left blank are omitted rather than written as empty strings.

  • Structured data describes the page it sits on. Marking up content that is not visible to a reader, or claiming a rating, a price or an availability the page does not show, is against the guidelines of the engines that consume it and can cost the whole site its rich results.
  • Valid markup is not the same as an eligible rich result. Each feature has its own required properties and its own quality rules, and several are restricted to particular kinds of site. Validate the block, then check the feature's own documentation before expecting anything to appear.
  • Dates are written as ISO 8601. A datePublished that disagrees with the date shown on the page is a conflict a crawler can see, so enter the real one.
  • Paste the block inside a script element of type application/ld+json in the head or body. The Download button saves the JSON alone; the Copy button copies the same JSON, and neither includes the surrounding script tags.

Structured data is a description of the page in a vocabulary a machine can read. It is worth getting right, and it is worth being clear that valid markup and a rich result are two different things.

Describe what a reader can already see

The governing rule across the engines that consume this markup is that it describes visible content. Marking up text that is not on the page, or claiming a rating, a price or an availability the page does not show, is a guidelines violation rather than an optimisation, and the penalty can reach the whole site rather than the one page.

Dates are the most common quiet conflict. A datePublished that disagrees with the date displayed on the page is a contradiction a crawler can see directly, so enter the real one. The same applies to an author name that appears nowhere in the byline.

Valid is not eligible

Each rich result feature has its own required properties and its own quality rules, and several are restricted to particular kinds of site. A block that validates perfectly can still produce nothing visible, because the feature it describes is not open to your site or is not triggered by the query.

So the workflow is: build the block, validate it with a structured-data testing tool, then read the documentation for the specific feature you are hoping to see. This generator handles the first step and reports which recommended properties are still blank; it cannot handle the other two.

Questions readers ask

Where does the block go?

Inside a script element of type application/ld+json, in the head or the body. The Copy and Download buttons here give you the JSON alone, without the surrounding script tags.

Can I put several types on one page?

Yes, as separate nodes or as an @graph array, provided each describes something actually on the page. An Article and a BreadcrumbList on the same page is ordinary; two different Organisations claiming to be the publisher is not.