Skip to content

JSON-LD to Expanded Form — Numio

Expands a JSON-LD document with jsonld.js: the @context is applied and removed, terms become full IRIs, and every value is wrapped in an array of @value or @id objects. Keys that do not map to an IRI are dropped.

Checking which IRIs your schema.org or custom @context terms actually resolve to.

JSON-LD

When to use it

  • Checking which IRIs your schema.org or custom @context terms actually resolve to.
  • Debugging structured data where a property silently disappears because it is not defined in the context.

How to use

  1. Paste a JSON-LD document with its @context into the JSON-LD editor.
  2. Read the expanded array: each node lists full property IRIs with values in arrays.
  3. Compare with your input; any property missing from the output was not mapped by the context.

JSON-LD

{
  "@context": {
    "name": "http://schema.org/name",
    "knows": {"@id": "http://schema.org/knows", "@type": "@id"},
    "homepage": {"@id": "http://schema.org/url", "@type": "@id"}
  },
  "@id": "http://example.org/jane",
  "@type": "http://schema.org/Person",
  "name": "Jane Doe",
  "homepage": "http://janedoe.example",
  "knows": "http://example.org/john"
}

Expanded JSON-LD

[
  {
    "@id": "http://example.org/jane",
    "@type": [
      "http://schema.org/Person"
    ],
    "http://schema.org/url": [
      {
        "@id": "http://janedoe.example"
      }
    ],
    "http://schema.org/knows": [
      {
        "@id": "http://example.org/john"
      }
    ],
    "http://schema.org/name": [
      {
        "@value": "Jane Doe"
      }
    ]
  }
]

Details and limitations

Expansion runs in your browser with the jsonld package. A remote @context such as https://schema.org/ (used by the default sample) is downloaded by your browser; if that fails (offline, CORS), the page shows an error naming the URL.

"@type": "@id" in a term definition turns a string value into an {"@id": ...} reference instead of a literal.

The output is always a top-level array, even for a single node.

FAQ

Why did some of my properties disappear?

Expansion drops keys that are not defined in the @context and are not absolute IRIs. For example, with only name mapped, a nickname key is removed from the output.

Can I use the schema.org context?

Yes. "@context": "https://schema.org/" works if your browser can fetch it. For offline use, write the term definitions inline as in the example.

Why is every value inside an array?

Expanded form always uses arrays for property values and @type, so processors can handle single and multiple values the same way.

Specifications and references