Search and SEO

What is JSON-LD?

JSON-LD is the format Google recommends for structured data: a block of JSON inside a script tag in the page head or body. It is preferred over Microdata and RDFa because it lives apart from the visible markup, so a design change cannot silently break it.

Also called: JavaScript Object Notation for Linked Data

Why the format choice matters

Microdata is woven through the HTML as attributes on elements. When a developer restructures a template, the markup breaks and nobody notices because nothing looks different. JSON-LD is a self-contained block, which makes it reviewable and far more durable.

Getting the shape right

  • One script tag containing one @graph array, rather than several unrelated blocks
  • Every node given an @id so others can reference it
  • References written as bare { "@id": "..." } objects
  • Absolute URLs throughout, matching your canonical exactly
  • Validated with both the Schema Markup Validator and the Rich Results Test — they answer different questions

Range errors validators forgive

  • email must be Text. A "mailto:" prefix makes consumers emit mailto:mailto:
  • primaryImageOfPage accepts only ImageObject, never a bare URL string
  • telephone should be E.164 and identical everywhere on the site
  • dateModified must reflect the content, not the deployment

Where this is covered in depth

A definition can only go so far. Schema markup that does something, and the kind that risks a penalty covers this properly — 3 minutes, free, no email required.

Who wrote this

Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada and Pakistan. These definitions come from client work rather than from a content brief — where an entry describes a mistake, it is usually one found on a real site. More about how I work.

Related terms

All 184 terms in the glossary →

Want this handled rather than explained?

Send the brief and you get a reply within one business day — either questions, or a scoping call. If your project is not something I should take on, I will say so then.

Response
Replies within 1 business day
Hours
Mon–Fri, 09:00–18:00 PKT — overlaps 05:00–14:00 UK, 00:00–09:00 US Eastern
Booking
Booking projects from October 2026
WhatsApp — opens a chat with +92 346 5348466 in a new tab