All tools

Schema.org JSON-LD Generator & Validator

Build structured data for Article, Product, Local Business, Event, Job Posting, and more — with live validation and ready-to-paste JSON-LD code.

Schema type

Core

Dates

Author

Publisher

Validation

headline is required for Article / BlogPosting
image is strongly recommended — Google requires it for Article rich results
author is recommended for Article rich results
datePublished is recommended
publisher helps Google identify the content source

Generated JSON-LD

{
  "@context": "https://schema.org",
  "@type": "Article"
}

Export

Test with Google

Copy the JSON-LD above, then paste it into Google's Rich Results Test to check eligibility on your live page.

  1. Copy the JSON-LD using the button above
  2. Open Google's Rich Results Test
  3. Use the “Code snippet” tab and paste
Open Rich Results Test

Rich result eligibility depends on page content, implementation quality, Google policy, and support for the selected schema type — not JSON validity alone.

All schema building, validation, and JSON-LD generation happen entirely in your browser. No field values, URLs, or structured data are sent to CodeAva servers. The tool is safe to use with draft content and internal URLs that are not yet public.

What JSON-LD is and why it matters for search

JSON-LD (JSON for Linked Data) is a structured data format that uses JSON to describe the meaning of content on a page. Instead of embedding markup throughout your visible HTML, JSON-LD lives in a single <script type="application/ld+json"> block — which makes it easy to add, update, and maintain without touching your page layout. Google has consistently recommended JSON-LD as its preferred structured data format because it is clean, self-contained, and framework-friendly.

Search engines use structured data to better understand what a page is about — whether it is a product with a price, an event with a date and location, a job listing with a hiring organization, or a local business with an address. When structured data matches the visible page content and meets Google's requirements for a supported rich result type, it may make the page eligible for enhanced search appearances such as product carousels, event listings, job result cards, and star-rated reviews. The operative word is eligible— JSON-LD validity is necessary but not sufficient.

JSON-LD is also notably easier to maintain in modern frameworks than Microdata or RDFa, which require attributes spread through HTML elements. A React or Next.js page can inject the entire structured data object in a single component, and the schema can be generated programmatically from the same data used to render the page. This tool generates the same format, ready to paste directly into any template or framework.

What is JSON-LD and why does Google prefer it?

JSON-LD is a W3C standard for expressing structured data as linked data using JSON. Google supports three structured data formats — JSON-LD, Microdata, and RDFa — but recommends JSON-LD for most implementations because it does not require modifying page HTML, works well with dynamically generated content, and is straightforward to validate. The format uses a @context property (typically set to https://schema.org) and a @type property to declare what kind of entity the data describes. Everything else follows the Schema.org vocabulary for that type.

Rich result cheat sheet

Google supports many structured data types, but only a subset are tied to specific rich result features. The following are among the highest-value types for most sites. Rich result eligibility depends on page content quality, policy compliance, and Google's current support for the feature.

Schema typeWhat it can help withPractical note
ArticleEnhanced appearance in Top Stories, Google News, and DiscoverRequires headline, image, and datePublished. Most impactful for news publishers and large blogs.
ProductProduct carousels, shopping results, and merchant listingsPrice, currency, and availability are practically required for most shopping-related features. GTIN improves product identification.
EventEvent listings with date, time, and location in searchstartDate and location are required. eventAttendanceMode and eventStatus are expected by Google for completeness.
LocalBusinessKnowledge panel details, Google Maps integration, business info in searchUse the most specific subtype available (e.g. Restaurant, not just LocalBusiness). Address and telephone significantly improve local search representation.
JobPostingJob listing cards in Google Search and Google for Jobstitle, description, datePosted, and hiringOrganization are required. Location or remote indicator is also required. validThrough is strongly recommended.
FAQPageUsed to have FAQ rich results with expandable Q&A in searchFAQPage rich result visibility is more limited than it used to be. Google reduced its appearance significantly. Still worth including for semantic clarity, but do not prioritise it as a traffic strategy.

Injecting JSON-LD in Next.js or React

In Next.js App Router, inject structured data in your page component or layout. The schema object should match the visible page content exactly — Google validates against what is rendered, not just the script block.

// app/blog/[slug]/page.tsx
export default function ArticlePage({ post }) {
  const schema = {
    "@context": "https://schema.org",
    "@type": "Article",
    "headline": post.title,
    "image": post.coverImage,
    "datePublished": post.publishedAt,
    "author": { "@type": "Person", "name": post.author },
  };

  return (
    <>
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
      />
      {/* page content */}
    </>
  );
}

The schema values should be derived from the same data source used to render the visible page content. Structured data that does not match visible page content violates Google's guidelines and may result in manual actions.

What valid JSON-LD does and does not guarantee

Google supports many schema.org types for structured data understanding, but only a subset are tied to specific rich result features in search. A valid, complete JSON-LD block that passes Google's Rich Results Test is a necessary condition for most rich results — but not a sufficient one. Search appearance also depends on implementation quality (structured data matching visible content), content relevance, adherence to Google's content policies, and Google's own algorithmic decisions about when to show enhanced features. Use this tool to build clean, accurate structured data, then test with Google's Rich Results Test for current eligibility.

What this tool helps with

Good uses

  • Building schema markup for blog posts and articlesgenerate Article or BlogPosting JSON-LD with headline, author, publisher, dates, and image to support Google News, Discover, and Top Stories eligibility.
  • Adding structured data to product pagesbuild Product schema with price, currency, availability, brand, and aggregate rating for shopping result features and product carousels.
  • Adding LocalBusiness details for local searchinclude name, address, telephone, opening hours, and geo coordinates to improve local search representation and Knowledge Panel data.
  • Preparing event markup for concerts, webinars, or conferencesgenerate Event schema with start date, location, attendance mode, and offers for event listing features in Google Search.
  • Creating job posting markup for career pagesbuild JobPosting schema with title, description, hiring organization, location or remote indicator, and salary for Google for Jobs visibility.
  • Exporting clean JSON-LD for CMSs and modern frameworkscopy the script tag directly, download as .json, or use the code output as a starting point for programmatic schema generation in Next.js, Nuxt, or similar frameworks.

Limitations to know

  • Expecting valid JSON-LD to guarantee rich resultsstructured data validity is necessary but not sufficient. Rich result eligibility depends on content quality, policy compliance, and Google's current feature support.
  • Adding schema that doesn't match visible page contentGoogle validates structured data against what is actually rendered on the page. Markup that describes content not visible to users violates Google's guidelines.
  • Using FAQPage as a primary SEO traffic strategyGoogle significantly reduced FAQPage rich result visibility. Include it for semantic completeness if you have Q&A content, but do not build a content strategy around it.
  • Live page crawling or validationthis tool builds structured data locally. Use Google's Rich Results Test for live page validation and eligibility checking against your deployed URL.

How to generate and deploy JSON-LD

  1. 1

    Choose the schema type that matches your page

    Select from Article, BlogPosting, Product, LocalBusiness, Event, JobPosting, Organization, FAQPage, BreadcrumbList, or WebPage. Choose the type that best describes the primary content of the page, not a wishlist of every type that might apply.

  2. 2

    Fill in the fields for your schema

    Complete the form. Required fields are marked with a red asterisk. Fields with amber notes are commonly required for Google's rich result features for that type. Use the + Add buttons for repeating fields like FAQ items, opening hours, and sameAs URLs.

  3. 3

    Review validation tiers

    Address errors first (these will cause invalid JSON or missing required properties). Review warnings next (these are commonly required for Google rich result support). Recommendations are optional improvements that increase schema completeness.

  4. 4

    Inspect and toggle to raw JSON-LD

    The live code panel updates as you type. Use the Raw JSON-LD toggle to see and copy the full formatted output. The JSON is always valid before export.

  5. 5

    Export, deploy, and test with Google

    Copy the JSON-LD or the script tag. Add it to your HTML head (or body for Job Posting per Google's documentation). Then paste into Google's Rich Results Test to check eligibility on your live page.

Common issues and how to fix them

Valid JSON-LD but the Rich Results Test shows no rich results detected

Structured data validity and rich result eligibility are different things. Google only shows rich results for supported types, and eligibility also depends on content quality and policy compliance. Check that the schema type you used has an active rich result feature in Google Search (visit developers.google.com/search/docs/appearance/structured-data/search-gallery for the current supported list).

Product schema not appearing in shopping results

Product rich results for shopping features practically require an offer with price, currency, and availability. Add a complete Offer block including priceCurrency. Also ensure your page is crawlable and that the product image is accessible. GTIN improves product identification in Google Shopping.

LocalBusiness schema not improving local search visibility

Make sure you are using the most specific subtype available — Restaurant, not LocalBusiness; HairSalon, not LocalBusiness. Include a full address with streetAddress, addressLocality, postalCode, and addressCountry. Opening hours and telephone significantly improve local search data quality.

JobPosting not appearing in Google for Jobs

JobPosting requires title, description, datePosted, and either a jobLocation with address or jobLocationType set to TELECOMMUTE. hiringOrganization with name and url is practically required. validThrough is strongly recommended. Also ensure the job listing page is crawlable.

Date fields causing validation errors

All date fields in Schema.org JSON-LD must use ISO 8601 format. Use YYYY-MM-DD for date-only values (e.g. 2024-06-01) or YYYY-MM-DDTHH:MM:SSZ for date-time values (e.g. 2024-06-01T09:00:00Z). JavaScript-style timestamps in milliseconds are not valid.

FAQPage markup not showing as rich result

Google significantly reduced FAQPage rich result visibility after 2023. The markup may still be valid and crawlable, but the rich result feature is more limited. Focus FAQPage markup on semantic content clarity rather than expecting visible search features. If rich result traffic was the primary goal, consider whether the effort is better spent elsewhere.

Frequently asked questions