go-supertools
SEO & Web Tools

JSON-LD to Microdata

Convert a schema.org JSON-LD block into HTML with itemscope, itemtype and itemprop microdata attributes, in your browser.

Runs in your browser Your input never leaves your device.

About this tool

Paste a JSON-LD block (with or without the surrounding script tag) and get equivalent HTML using microdata attributes. @type becomes itemtype (relative types are prefixed with the @context URL, schema.org by default), nested objects become nested itemscope elements, arrays repeat the property and plain values become span elements. URL strings become links. Limitations: @graph, @id references between nodes, @list, @set and custom context term definitions are not supported; @id on an object becomes itemid. Numbers and booleans are written as text.

How to use it

  1. Paste the JSON-LD into the input box.
  2. Press Convert to Microdata.
  3. Copy the HTML into your page.

Example

Input
{"@context":"https://schema.org","@type":"Person","name":"Ada","address":{"@type":"PostalAddress","addressLocality":"London"}}
Result
<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>

Common problems

"Invalid JSON"
Check for trailing commas, single quotes or missing brackets.
"@graph is not supported"
Split the graph into separate objects and convert each one.
Top-level object has no @type
Microdata needs an itemtype, so add an @type to the root object.