go-supertools
SEO & Web Tools

Microdata to JSON-LD

Convert HTML containing schema.org microdata into JSON-LD in your browser, including nested items and repeated properties.

Runs in your browser Your input never leaves your device.

About this tool

Paste HTML that uses microdata and get a JSON-LD object. The page is parsed with the browser's DOMParser (nothing is run or fetched), then each top-level itemscope is walked: itemtype becomes @type, itemprop becomes a property, nested itemscope elements become nested objects and repeated properties become arrays. Values come from the element as the microdata spec defines (content, href, src, datetime, value or text). All values are strings. Limitations: itemref is not supported, only schema.org types are shortened, and the output always uses the schema.org @context.

How to use it

  1. Paste the HTML fragment or page.
  2. Press Convert to JSON-LD.
  3. Copy the JSON-LD, optionally into a script type="application/ld+json" tag.

Example

Input
<div itemscope itemtype="https://schema.org/Person"><span itemprop="name">Ada</span><div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"><span itemprop="addressLocality">London</span></div></div>
Result
{
  "@context": "https://schema.org",
  "@type": "Person",
  "name": "Ada",
  "address": {
    "@type": "PostalAddress",
    "addressLocality": "London"
  }
}

Common problems

"No top-level itemscope found"
Make sure an element has the itemscope attribute and is not itself an itemprop of another item.
A property is missing
It must be inside the itemscope element and carry an itemprop attribute; itemref links are not followed.
Numbers appear as strings
Microdata has no types, so every value is output as text.