JSON-LD Tools

Expand, compact, flatten, frame, and normalize JSON-LD documents in your browser. This is the one tool on the site that can fetch remote @context documents, and it says so before you run anything.

Network note: when a document references a remote @context (for example https://schema.org), this tool fetches that context from the web so it can process the document. No other tool on this site uses the network, and your document itself is never sent anywhere; only the public context URLs named in it are requested.

No second input needed.
Examples:
JSON-LD document
Expanded output
Result will appear here
Ready. Press Expand or Ctrl+Enter.

How to use the JSON-LD Tools

  1. Paste a JSON-LD document, or start with the schema.org sample. Read the network note first if the document names a remote @context.
  2. Choose an operation. Expand is the default. Compact asks for a Context JSON document, and Frame asks for a Frame JSON document; the second input appears only for those two operations.
  3. Click the action button. Check the Contexts fetched line after the run to see exactly which public URLs, if any, the browser requested.
  4. If a remote context fails, paste that context inline in the document and run again. The inline example chip shows the pattern and works with no network request.

Example

Press Expand and the tool fetches the schema.org context, lists it in the Contexts fetched line, and returns the document with full IRI keys. The inline context example chip runs a similar document with no network request at all.

{
  "@context": "https://schema.org",
  "@type": "Person",
  "name": "Ada Lovelace",
  "jobTitle": "Software Engineer",
  "knowsAbout": ["JSON", "JavaScript", "Data modeling"]
}

Frequently asked questions

Does JSON-LD Tools send my document to a server?

No. Processing happens in your browser. If your document names a remote @context, your browser requests only that public context file, directly from its host. Your document is never sent.

Why did a remote @context fail to load?

Some servers block browser requests through CORS, and others are slow or return a response that is not a usable context. The tool shows the URL and the reason; pasting the context contents inline in your document always works.

What does Normalize do?

Normalize canonicalizes the document with URDNA2015 and returns N-Quads, so two equivalent documents produce byte identical output that can be compared or signed.