Microdata to JSON-LD Converter

Reads itemscope, itemtype, itemprop and itemid from pasted HTML and writes equivalent JSON-LD.

Use the tool

Why this tool exists

Moving from microdata to JSON-LD means rewriting markup by hand, and mistakes creep in with nested items. This tool applies the value rules of the HTML Microdata specification: meta content, src and href for links, data and time attributes, text content otherwise, and follows itemref.

Values keep their string form, so a price stays "89.99"; the converter does not guess numbers. Relative links stay relative unless you give a base URL.

How to use it

  1. Paste the HTML with the microdata.
  2. Optionally enter the base URL for relative links.
  3. Read the JSON-LD output.
  4. Place it in a script tag and remove the microdata attributes.

Frequently asked questions

Does it handle nested items?

Yes. An element with itemscope and itemprop becomes a nested object.

What about several items on a page?

Several top-level items are output in one @graph.

Are multiple values supported?

Repeated properties become arrays.

Is the output verified against another converter?

Checked by hand against the specification on samples; no independent converter was available in the build environment.