Loading...
Generate XML Schema (XSD) from XML documents — instantly in your browser.
Paste your XML document into the input area
Set type inference, namespace, and element form preferences
Click Generate to create XSD, then copy or download the schema
Automatically detects integer, decimal, boolean, date, and string types
Detects XML attributes and generates corresponding XSD attribute definitions
Identifies repeated elements and sets maxOccurs="unbounded"
Optional target namespace and qualified/unqualified element form
The schema is based on a single document sample. It correctly infers structure but may need manual refinement for optionality, exact cardinality, or enumerated values.
You can specify a target namespace in the options. Existing namespace prefixes in the XML are preserved in element names.