JSON Schema ↔ XSD converter

Convert a JSON Schema into an XSD or an XSD into a JSON Schema. The JSON describes the XML as in "XML ↔ JSON" (attributes with a prefix, text in #text, repeated elements as arrays). Anything that cannot be converted is listed as a warning, not silently dropped.

Your data stays on your computer. Files are processed in your browser and are never uploaded.

Drop a .json file on this area (5 MB max), or

Keyboard shortcuts

In this tool

This tool has no keyboard actions.

Everywhere

Open this panel (outside text fields)
?
Closes panels and menus, never clears data
Esc
Search for a tool
/ or CtrlK

How to use it

  1. Pick the direction, then paste the schema or drop the file.
  2. Choose the attribute prefix (as in "XML ↔ JSON") and, from JSON Schema, the root element name.
  3. Read the warnings: they are the parts of the schema with no equivalent. Then copy or download the result.

Frequently asked questions

Which parts of XSD and JSON Schema are converted?

Elements, attributes, sequence/choice/all, named types, restrictions (enumerations, patterns, lengths, ranges), occurrences (minOccurs, maxOccurs) and documentation. The other way: type, properties, required, items, enum, const, pattern, minimum/maximum, minItems/maxItems, format, $ref to $defs, allOf.

What happens to what cannot be converted?

It is listed in the warnings with its location: import, namespaces, key/unique, not, if/then/else, patternProperties and the like. Nothing is silently dropped.

Is my data sent to a server?

No: the conversion runs in your browser.

Privacy

The schemas stay in your browser: they are not sent to any server.

Tool chains

Link several tools into a path: after using a tool, “Send to…” offers the next step first. Saved chains keep only a name and the tools, never your data.

Saved chains

No saved chains.

New chain