JSON-LD to Microdata Converter
Convert pasted Schema.org JSON-LD into HTML Microdata. The converter accepts plain JSON-LD or script-wrapped JSON-LD, handles common root objects, root arrays, @graph documents, nested objects, repeated scalar properties, and string or array @type values, then returns copyable HTML for review.
Microdata vs JSON-LD
Standards
JSON-LD: Modern standard, easy to maintain, lives in a script tag.
Microdata: Traditional standard, integrated directly into HTML tags.
Why Convert?
Why convert? Some legacy systems or specific CMS plugins only support Microdata.
The JSON-LD to Microdata Converter turns pasted Schema.org JSON-LD into HTML that uses Microdata attributes such as itemscope, itemtype, and itemprop. Paste a JSON-LD object, a root array, an @graph document, or a script-wrapped JSON-LD block, then run the converter to generate copyable Microdata-style markup.
This tool is useful when you need to compare two structured-data formats, maintain an older template that expects Microdata, document how a schema object would look inline, or migrate a JSON-LD example into an HTML pattern for manual editing. It is a converter, not a validator. It does not prove that the schema is complete, that it matches the visible page, or that any search feature will use it.
How to use the converter
- Copy the JSON-LD you want to convert. You can include only the JSON object or include the surrounding
<script type="application/ld+json">tag. - Paste it into the field labeled Enter JSON-LD.
- Click Convert to Microdata.
- Review the generated HTML in the result area. Check each
itemtype,itemprop, nested item, repeated property, and URL value before using it. - Use Copy Microdata when you want to copy the output into your editor, CMS, template, or test document.
- Validate and inspect the final page after you adapt the output to your real HTML layout.
The visible workflow uses a textarea, a convert button, a readonly output textarea, and a copy button. There is no URL crawler, file upload, saved history, schema selection wizard, or browser rendering step in this converter. It works with the JSON-LD text you paste into the form.
What the converter does
The inspected implementation submits the pasted text through a Livewire request and parses it with PHP's JSON decoder. Before decoding, it removes opening and closing script tags, which lets you paste a common JSON-LD script block instead of manually extracting the JSON first. If the JSON cannot be decoded, the tool reports an invalid JSON syntax message and does not generate Microdata.
After decoding, the converter recursively turns supported JSON-LD structures into HTML. A typed object becomes a div with itemscope and an itemtype URL. Non-keyword properties become child elements with itemprop. Nested objects become nested scoped div elements. Repeated values are emitted as repeated properties. Scalar URL values are emitted as links when the URL branch is reached, while ordinary scalar values are emitted as spans.
| JSON-LD input pattern | Observed output behavior |
|---|---|
"@type": "Person" |
Outputs itemtype="https://schema.org/Person". |
"@type": "https://schema.org/Event" |
Preserves the full Schema.org URL as the itemtype. |
"@type": ["Person", "Thing"] |
Outputs both Schema.org type URLs in the same itemtype attribute, separated by a space. |
| Root JSON array | Converts each root item in order and returns multiple top-level Microdata blocks. |
@graph array |
Converts each graph node in order and returns multiple top-level Microdata blocks. |
| Nested object property | Creates a nested div itemprop="..." itemscope block when the nested object has a type. |
| Repeated scalar property | Outputs repeated span itemprop="..." elements for each scalar value in the list. |
| Special characters in values | Escapes generated attribute values and text, so characters such as <, >, and & are represented safely in the output. |
Verified example: @graph with multiple types
This example checks three important behaviors: an @graph document, an array-style @type, and escaping for text and URL characters. The deployed converter was tested with this shape on September 16, 2026.
Input JSON-LD
{
"@context": "https://schema.org",
"@graph": [
{
"@type": ["Person", "Thing"],
"name": "Ada <Lovelace> & Co",
"url": "https://example.com/?q=1&x=<tag>"
}
]
}
Output from this tool
<div itemscope itemtype="https://schema.org/Person https://schema.org/Thing">
<span itemprop="name">Ada <Lovelace> & Co</span>
<a itemprop="url" href="https://example.com/?q=1&x=<tag>">https://example.com/?q=1&x=<tag></a>
</div>
The generated Microdata uses one top-level scoped item because the graph contains one node. The two types become a space-separated itemtype value. The name and URL are escaped in the generated HTML, which is important if you are copying the output into another document. After copying, inspect the final rendered HTML in your own template so you know exactly how those escaped characters will appear.
Verified example: root arrays and nested objects
A root JSON array is handled as multiple top-level items. This is useful when a page has separate structured-data objects, such as an article and a person, or when you are converting a compact test fixture that stores several nodes in one JSON array.
Input JSON-LD
[
{
"@type": "Article",
"headline": "First"
},
{
"@type": "Person",
"name": "Grace"
}
]
Output from this tool
<div itemscope itemtype="https://schema.org/Article">
<span itemprop="headline">First</span>
</div>
<div itemscope itemtype="https://schema.org/Person">
<span itemprop="name">Grace</span>
</div>
The converter does not wrap these blocks in a parent container or add a shared context because Microdata expresses context through inline item attributes rather than a top-level JSON-LD object. If you place several generated blocks into a page, decide where each block belongs in the real HTML and whether those properties should be visible, hidden in meta tags, or represented in another way.
Verified example: scalar arrays and nested offers
This example shows a product with repeated images and a nested offer. The output demonstrates a limitation worth noticing: scalar array items are currently emitted as repeated spans, even when a scalar value looks like a URL. Scalar URL properties outside this recursive list path can become anchors, but list values should be reviewed carefully before production use.
Input JSON-LD
{
"@type": "Product",
"name": "Widget",
"image": [
"https://example.com/a.jpg",
"https://example.com/b.jpg"
],
"offers": {
"@type": "Offer",
"price": "19.99",
"availability": "https://schema.org/InStock"
}
}
Output from this tool
<div itemscope itemtype="https://schema.org/Product">
<span itemprop="name">Widget</span>
<span itemprop="image">https://example.com/a.jpg</span>
<span itemprop="image">https://example.com/b.jpg</span>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<span itemprop="price">19.99</span>
<a itemprop="availability" href="https://schema.org/InStock">https://schema.org/InStock</a>
</div>
</div>
This is a good example of why the result should be treated as a conversion draft. For some Microdata patterns, you may prefer meta, link, img, visible text, or a different template structure instead of the generic span and a elements generated by the converter.
Inputs, outputs, and limitations
The input is pasted JSON-LD text. The tool accepts valid JSON after optional script-tag removal. It does not fetch a URL, crawl a page, execute JavaScript, load external linked data, resolve remote contexts, import files, or inspect the final DOM after your CMS renders a page. If your structured data is generated dynamically, copy the actual JSON-LD output you want to test and paste that into the textarea.
The output is HTML Microdata generated from supported JSON shapes. It is not a complete HTML page, and it is not a guarantee that the resulting markup is the best Microdata pattern for your schema type. JSON-LD and Microdata can describe similar Schema.org vocabulary, but they are not always one-to-one in practical templates. JSON-LD often sits in a script block and can describe graph relationships compactly; Microdata lives in HTML elements and can be harder to fit cleanly around visible page content.
- The tool reports invalid JSON syntax when PHP's decoder cannot parse the submitted text.
- It removes
scripttags before parsing, but it does not sanitize or repair broken JSON-LD content inside them. - It skips JSON-LD keyword keys such as
@context,@id, and@typeas normal properties, while using@typeto build Microdata item types. - It supports root objects, root arrays, and
@grapharrays, but it does not preserve graph identifiers or linked-node relationships as Microdata references. - It supports string and array
@typevalues, but non-string type entries are ignored. - It escapes generated attribute values and text content, but you should still review the copied output in the final destination.
- It does not validate Schema.org required or recommended properties.
- It does not check Google, Bing, or other search-engine eligibility rules.
- It does not promise rich results, ranking improvements, indexing changes, or error-free structured data.
Microdata design notes
Microdata is embedded in HTML, so the cleanest final markup usually depends on your page layout. A generated span may be fine for visible text, but a URL, image, date, price, or machine-readable value may be better represented with another element or attribute in your production template. For example, an image property may belong on an img element, a canonical URL may belong on a link element, and a date may belong on a time datetime="..." element.
When converting from JSON-LD, pay special attention to graph-shaped data. JSON-LD can separate nodes with @id references and collect them under @graph. The converter can emit each graph node as a separate Microdata block, but it does not rebuild every relationship that may have been implied by identifiers. If the relationships matter, compare the result with Schema.org examples and your final rendered HTML rather than relying on the converted snippet alone.
Troubleshooting
Invalid JSON syntax
Check for trailing commas, unquoted property names, missing brackets, pasted comments, smart quotes, or extra text outside the JSON object. The converter is not a JSON repair tool. Use JSON Validator when you want to isolate syntax problems before converting.
The output has several top-level blocks
That is expected for a root array or an @graph document with multiple nodes. Each node is converted independently. Decide whether those items should stay separate in your HTML, be nested into visible page content, or remain as JSON-LD instead.
A property was emitted as a span instead of a link or meta tag
The converter uses generic output elements. It creates anchors for scalar URL values in the main object-property branch, but some repeated scalar values are emitted as spans. Edit the markup by hand when a property needs a more specific Microdata pattern.
The result is valid HTML but not ready to publish
That can happen. Conversion answers the format question, not the content-quality question. Check whether the markup describes content users can see, whether the type and properties are appropriate, and whether your production HTML remains accessible and maintainable.
Related tools
Use this converter when you already have JSON-LD and need a Microdata draft. For the opposite direction, use Microdata to JSON-LD. If you need to check raw JSON syntax first, use JSON Validator. If you want to reformat JSON-LD before conversion, use JSON Beautifier. If you are creating new starter structured data instead of converting existing markup, use Schema.org JSON-LD Generator. When you are cleaning the surrounding HTML, HTML Formatter can make template snippets easier to review.
Technical references
- Schema.org guide to Microdata
- Schema.org JSON-LD examples
- W3C HTML Microdata Working Group Note
- JSON-LD 1.1 specification
- Schema Markup Validator
- Google Rich Results Test
Editorial notes
Technical behavior reviewed September 16, 2026. The deployed converter accepted script-wrapped JSON-LD, rejected invalid JSON with an error, converted @graph nodes, converted root arrays, handled string and array @type values, and escaped generated attribute and text output in the tested cases. Pasted JSON-LD is submitted to the Digital Domain Kit server for conversion through the Livewire component, so avoid pasting confidential source code or private business data unless you are comfortable processing it through this service.