Back to blog

JSON-LD Schema Markup: Build, Validate, and Maintain It

JSON-LD Schema Markup: Build, Validate, and Maintain It

JSON-LD gives a page a machine-readable description of its subject. A useful implementation starts with the page’s visible content: who or what it describes, which facts are current, and which URL represents that content. Choose the appropriate schema type, fill in facts you can support, then validate the result and inspect the published page.

The schema markup generator provides starting forms for Organization, LocalBusiness, Article, FAQPage, and Product. These forms are a drafting aid. They do not inspect your website, verify your claims, or certify that the output meets every requirement of a particular search feature.

Separate valid markup from search eligibility

There are three different checks. First, the document must be valid JSON. Second, its types and properties need to describe the intended entities coherently. Third, a search service may have additional requirements for a specific presentation. Passing one check does not automatically pass the others.

Google recommends JSON-LD among its supported structured-data formats and requires markup to represent the page’s content accurately. A valid result does not guarantee a special search appearance. Consult the Google structured-data guidelines before treating validation as a promise of traffic or enhanced listings.

Define success as accurate data that remains consistent with the page. Track search outcomes separately.

Inventory the facts on one page

Start with a single representative page rather than generating markup for every URL at once. Write down the visible name or headline, description, primary URL, author or organization where applicable, relevant image, and any dates that the page actually supports.

For a product page, inspect the displayed offer and its currency. For an article, distinguish the author from the publishing organization. For a business page, check whether an address belongs to the location described or to a different branch. Keep unsupported fields empty instead of filling them with plausible-looking guesses.

A simple working table helps reviewers catch mismatches:

FieldSource on the pageReview question
Name or headlineMain headingDoes the markup describe this exact page?
DescriptionVisible introductionIs it a fair summary rather than an extra claim?
URLCanonical page addressIs this the intended public version?
Publication dateEditorial recordIs this a real publication date?
Price and currencyCurrent displayed offerDo both match what a visitor sees?

Keep this table with the implementation task. It gives the person reviewing the change a concrete basis for approval and gives a future editor a way to find the source of each value.

Choose the smallest useful schema

Use the generator’s Article form for an article and its Organization form for organizational information. Do not choose Product simply because a page mentions a product. The entity you describe should be the subject of the page, and the properties should explain that subject.

A page can contain more than one entity, but more markup is not automatically better. Begin with one clear object. If a theme, CMS plugin, or application already emits structured data, inspect that output before adding another block. Two descriptions of the same organization with conflicting names or URLs are harder to maintain than one consistent description.

For classroom or utility sites, this review is especially valuable on shared templates. A mistake in one template can propagate to hundreds of localized pages. Confirm the template’s source data before expanding a small trial to every route.

Draft with the generator

Open the schema markup tool, choose a type, and enter the facts you gathered. Its forms omit empty values from the generated output. That makes a draft easier to read, but an omitted field may still be required for the specific search feature you want to support.

Copy the output into your project and review it as code. Replace demonstration names and URLs. Check that image references point to the intended public asset. If you selected FAQPage, read each question and answer against the visible FAQ section rather than inventing additional questions solely for the markup.

Here is a deliberately small organization example. It illustrates the structure, not a complete implementation for every search service:

{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Example Learning Studio",
  "url": "https://example.com/",
  "description": "A studio publishing classroom planning resources."
}

All example values need replacing before publication. In a real application, generate these values from the same content records used to render the page. That reduces the chance that an editor changes the visible name while leaving the structured-data name behind.

Validate at separate levels

Use the JSON formatter to inspect formatting and catch syntax mistakes such as missing commas or unmatched quotation marks. Treat formatting as a first check, not a statement about whether the object uses schema properties appropriately.

Next test the vocabulary and the intended search feature with suitable validators. Read the results as specific findings. A missing property, a malformed URL, and an unsupported search feature are different problems that require different fixes. Record the issue and the page that triggered it rather than repeatedly regenerating the same object without understanding the message.

When you add automated checks, use realistic fixtures. Include a title containing quotation marks, an accented name, an empty optional field, and a description containing a less-than sign. These cases help reveal broken serialization that a simple English demo title will not expose.

Embed safely and inspect the published result

JSON-LD is normally placed in a script element with the type application/ld+json. Use your framework’s supported method for producing that element. Build a data object and serialize it; avoid constructing JSON by inserting unescaped text into a large string.

For inline HTML, account for text that could close the script element. A common defensive serialization step replaces literal less-than characters in the serialized JSON with their Unicode escape. Keep that responsibility in a small shared helper so every route follows the same rule. Test that the browser receives one intact JSON-LD block even when a content field contains unusual punctuation.

After deployment, inspect the actual page output. Confirm the canonical URL, headline, and description all refer to the same page. Check a second page using the same template so you can catch values accidentally hardcoded to the first example.

Review localization and discovery together

For a translated article, use the metadata for that article’s language and point to its own canonical URL. Do not copy an English title into every language version simply because the template is shared. If a page still displays English content, describe that situation accurately instead of claiming the article itself has been translated.

Also check whether crawlers can reach the intended page. The robots.txt generator can help draft crawl rules, but review those rules against the deployed paths before publishing. Structured data, canonical links, sitemap entries, and crawl settings should be reviewed together because they describe or control different parts of the same page-discovery workflow.

Maintain a short checklist for updates: content changed, metadata changed, JSON-LD checked, canonical checked, and representative output inspected. Run it when prices, business details, article titles, or route structures change. A valid object that describes last year’s page is still a maintenance problem.

Frequently asked questions

Should every page have every schema type?

No. Select the types that describe the page’s actual content. Adding unrelated entities increases the amount of data you must maintain and makes review harder without making the page more accurate.

Can I publish generated output unchanged?

Review every field first. The generator cannot know your real publication date, author, business details, or current offer. Treat copied output like any other code change that needs factual review and local validation.

Should I add ratings that are not displayed?

Do not invent ratings or review counts. Structured data should be grounded in the content and evidence your site actually provides. If you do not have the information, leave it out and evaluate whether the remaining markup fits your intended use.

What is the best first improvement on an existing site?

Inspect one real page and compare its structured data with the visible heading, description, URL, and dates. Correct concrete mismatches, add a reusable serializer, and verify the shared template before expanding to more pages.

Related tools

Related guides