JSON Schema $ref expand

Client

Paste a JSON Schema and expand $ref values that point into the same document (#/ fragments only). Remote URLs are not fetched; pure reference cycles leave a final $ref.

Learn more: $ref and bundling

Expand in-document JSON Pointer references (`#/definitions/...`, `#/components/schemas/...`) so tools that ignore `$ref` still see the full shape—complements validation on the JSON Schema page.

Same-document only

Only fragments starting with `#` are resolved against the pasted root. Remote `$ref` URLs are not fetched (browser CORS and privacy). Missing pointers produce an error message.

Cycles

If definitions reference each other in a loop, the walker stops and leaves a `$ref` at the cycle break so output stays finite.

Dereference $ref

?

Resolves $ref pointers that start with # (same document only). Useful before handing a schema to tools that do not follow references. Nothing is uploaded.

Fragment-only: remote $ref URLs are not fetched (CORS). If the pointer is missing, you get an error. Pure cycles keep a trailing $ref.

Common use cases

  • Flatten OpenAPI or hand-written schemas before passing them to tools that do not resolve references.
  • See the fully expanded shape of definitions reused under multiple properties.
  • Prepare a single-file schema draft for code generators that expect no $ref.

Common mistakes to avoid

  • Expecting remote $ref to load

    Only fragment pointers in the pasted text are resolved. HTTP(S) $ref targets stay unchanged and are not downloaded.

FAQ

Does this replace JSON Schema validate?

No—use the JSON Schema page for Ajv validation. This page only expands in-document references.

Where can I get help fixing invalid JSON?

Use the JSON repair helpers on the site’s AI tools if you need wording or structure suggestions; this page stays deterministic and local.

Common search terms

Phrases people search for that match this tool. See the full long-tail keyword index.

  • json schema dereference online
  • expand json schema ref
  • bundle json schema definitions

Related utilities you can open in another tab—mostly client-side.