Prototype and Test Your Markup

Using the features of this site and the Structured Data Testing Tool, you can prototype, test, and make on-the-fly adjustments to your markup.

Prototype markup

These steps describe a progressive approach to exploring and prototyping markup:

  1. Start in the Search Gallery.

    The Search gallery illustrates rich Search results for key data types, which include Rich Cards and Rich Snippets. Each example's button loads the markup directly in the Structured Data Testing Tool (SDTT).

  2. Explore the Data Type reference.

    Here you'll see all the data types open for implementation—indicating required and recommended fields, and providing markup examples that load directly in the SDTT.

  3. Use the Structured Data Testing Tool.

    See the next section.

Test markup — Structured Data Testing Tool

The Structured Data Testing Tool (SDTT) provides a variety of ways to develop, test, and modify your structured markup.

You can load markup into the tool either directly or by supplying a URL. The editing environment for the tool provides these utilities to simplify markup testing:

  • Automatic highlighting—once you load your content in the editor, you can click on a validated field on the right of the editor to see which line in your markup produced that field. This is handy for isolating syntax errors.
  • Search & replace keyboard shortcuts—supports plain text and JavaScript regular expressions. The search and replace status line appears at the top of the Editor Panel.
  • Keyword completion of and JSON-LD keywords.

Test URLs directly

  1. Go to the Structured Data Testing Tool.
  2. Enter the URL of the page that contains the marked-up content into the "Fetch URL" tab of the dialog box.

    Click the "Run Test" button.

  3. The editor loads the markup from that page, showing the URL you supplied at the top.

  4. Address errors and warnings, and make customizations as described below.

Test markup in the editor

  1. Go to the Structured Data Testing Tool.
  2. Copy and paste your markup into the "Code Snippet" tab of the dialog box.

    Click the "Run Test" button.

  3. The markup code appears in the editor panel.

  4. Address errors and warnings, and make customizations as described below.

Address warnings and errors

  1. Address any warnings and errors.

    Warnings indicates additional fields you can mark up for improved Search presentation.

    Errors indicate either missing required fields or syntax errors. Clicking an error in the validation pane also highlights the place in the markup where the error is detected.

  2. Customize your markup.

    You can provide additional fields and further customize the markup until it more closely resembles the code you need for your own pages.

    Click the arrow to validate your markup.

  3. Search and replace.

    The Editor supports search and replace through keyboard shortcuts.

    • Control-F / Command-F — Search Search
    • Control-G / Command-G — Find next
    • Shift-Control-G / Shift-Command-G — Find previous
    • Shift-Control-F / Command-Option-F — Replace
    • Shift-Control-R / Shift-Command-Option-F — Replace all
  4. Keyword completion

    The editor supports auto keyword completion of and JSON-LD keywords using the Control-Space keyboard shortcut.

Send feedback about...