Canonical: https://toolipedia.app/xml-schema-tool

# XML Schema Tool: Validate and Infer XSD

Validate an XML document against an XSD schema with line numbers for each problem, or infer a starter XSD from a sample XML document.

Breadcrumbs: Toolipedia > Developer tools > Code and developer utilities > XML Schema Tool: Validate and Infer XSD

## About XML Schema Tool: Validate and Infer XSD

An XSD describes which elements, attributes and values an XML document may contain. Paste an XML document and a schema to validate: the tool checks element order and counts (sequence, choice, all, minOccurs and maxOccurs), types such as date, decimal and positiveInteger, facets such as enumeration, pattern and ranges, required attributes, IDs and nillable elements, and lists every problem with its line number. Or switch to infer mode to generate a starter XSD from a sample document, with guessed types, optional elements and required attributes.

## How to use XML Schema Tool: Validate and Infer XSD
1. Choose validate or infer. Paste the XML document into the first box.
2. For validation paste the XSD schema into the second box. Well-formedness errors in either file are reported with line and column.
3. Fix the listed problems, or copy the inferred XSD and tighten it by hand with enumerations, patterns and limits.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- xml schema tool
- validate xml against xsd
- xsd validator online
- generate xsd from xml
- infer xml schema
- xml validation errors line number

## Frequently asked questions

### Which parts of XSD does the validator support?

The common parts of XSD 1.0 in a single schema file: elements, attributes, sequence, choice, all, groups, simple and complex types, extension and restriction, facets, lists and unions. Imports, identity constraints and XSD 1.1 are not followed.

### Can a document pass here and fail elsewhere?

Yes, if it depends on the parts that are not checked. For a final check run a full validator such as xmllint or Xerces, especially for schemas that import other files.

### How good is the inferred schema?

It describes only your sample. One document cannot show that an element is optional or repeatable, so use several samples, or edit the result. Types are guessed from values: integer, decimal, boolean, date, dateTime or string.

### Is XML Schema Tool: Validate and Infer XSD free?

Yes. XML Schema Tool: Validate and Infer XSD on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with XML Schema Tool: Validate and Infer XSD:
- [JSON to XML converter](https://toolipedia.app/json-xml-converter)
- [SQL Schema Diff](https://toolipedia.app/sql-schema-diff)
- [Mock JSON from JSON Schema](https://toolipedia.app/mock-json-from-json-schema)
- [Podcast RSS feed XML validator](https://toolipedia.app/podcast-rss-validator)
- [XML formatter & validator](https://toolipedia.app/xml-formatter)
