ToolZoneX
Blog

JSON-LD to Normalized (URDNA2015) Converter

Paste a JSON-LD document to canonicalize it with URDNA2015, producing deterministic, byte-identical N-Quads output for hashing or signing. Free online developer tool.

Paste JSON-LD Document
Normalized (URDNA2015) N-Quads
Normalized output will appear here...

Free JSON-LD to Normalized (URDNA2015) Converter

Paste a JSON-LD document to canonicalize it with the URDNA2015 algorithm, producing deterministic, byte-identical N-Quads output regardless of how the source JSON was written. Runs entirely in your browser using the official jsonld.js reference implementation.

How to Use It

Paste any JSON-LD document into the input box, or click "Load Example" to see a sample run. The tool expands your document into RDF, then applies URDNA2015 canonicalization — sorting statements and deterministically relabeling blank nodes — before serializing the result as N-Quads text.

Example

The sample document above has no blank nodes, so its normalized output looks the same as its plain N-Quads conversion — two sorted statement lines. The difference becomes visible on documents with multiple blank nodes or differently ordered keys: normalizing two such documents that describe the same graph always produces identical text, while plain N-Quads conversion might not.

Common Use Cases

  • Generating a stable content hash for a JSON-LD document, regardless of formatting differences.
  • Producing the canonical form required for JSON-LD-based digital signatures (e.g. Verifiable Credentials data integrity proofs).
  • Comparing two JSON-LD documents for semantic equality even when their raw JSON differs.
  • Deduplicating linked-data records that describe the same graph with different blank node labels.

FAQs

How is this different from the N-Quads tool?

N-Quads conversion (jsonld.js's toRDF) is a straightforward format change — your JSON-LD document turned into RDF statements in whatever order the processor happens to produce them. This tool instead applies the URDNA2015 canonicalization algorithm: it sorts statements and deterministically relabels every blank node so that the same underlying data always normalizes to byte-identical output, no matter how the original JSON was formatted, what order its keys appeared in, or what blank node identifiers it used. Two JSON-LD documents that describe the same graph will normalize to the exact same text, even if their source JSON looks completely different.

What is this actually used for?

Deterministic, canonical output is what makes it possible to generate a stable content hash or a digital signature over a JSON-LD document (as used in, for example, Verifiable Credentials' data-integrity proofs) — you can't hash or sign a document reliably if trivial formatting differences (key order, whitespace, blank node naming) change the bytes you're hashing. Normalization strips all of that variability out first.

Does this tool support remote @context URLs (like https://schema.org/)?

No — this tool intentionally disables network fetches for @context and document dereferencing, since a static, client-side tool can't reliably rely on a remote server's CORS policy or availability. Use a document with an inline @context object (a JSON object, not a URL string) — the sample document above and virtually every hand-written JSON-LD example works this way. If you paste a document whose @context is a URL, you'll get a clear error instead of an unpredictable network failure.

Is my document uploaded anywhere?

No — all JSON-LD processing happens entirely client-side in your browser using the jsonld.js library. Nothing you paste is sent to a server.