Toolvito

Calculates on this device. File exports run online.

XML Editor & Validator

Paste XML or open a file. The page checks that it is well-formed and shows where a mistake is, compares two documents, turns XML into JSON, and writes an XML Schema from your document or a sample from a schema. The server validates against an XSD or DTD.

Enter your values

Checks that the XML is well-formed, shows where a mistake is, counts its parts and formats it.

Your values

It is read on this device and is not uploaded. Nothing that the document names (a DTD, an entity) is fetched.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Run.

Validate on the server, and large files

Task
Validate against an XSD or DTD

Choose your .xsd or .dtd file and the XML files to check (up to 20 files of 1 GB each). With no XML file chosen, the XML of the page is checked. After Make an XML Schema or Make sample XML above, the page result is checked against its schema; chosen XML files are checked against that schema too.

Or drop files here. CSV, TSV, TAB, TXT, JSON, JSONL, NDJSON, PARQUET, XLSX, XML, YAML, YML, TOML, PLIST, GED, XSD or DTD, up to 20 files, 1 GB each at most.

    More options

    The checks above work in your browser. When you use this box, the files you choose here are sent to the Toolvito server, and for validation also the XML or schema shown on the page. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

    How to use it

    1. Choose what you want to do under What do you want to do?.
    2. Paste your XML, or choose Or open an XML file from your device. The result appears as you type.
    3. To check a document against a schema, use Validate against an XSD or DTD in the box below and choose your .xsd or .dtd file there.
    4. After Make an XML Schema or Make sample XML, press Validate on the server with no file: the page result is checked against its schema.

    What each part does

    • Check and format XML applies the rules of XML 1.0 and of namespaces and shows the line and column of the first mistake. It counts elements and attributes and formats the text.
    • Compare two XML documents lists elements, attributes and text that were added, removed or changed, by a path such as /order/item[2]/@qty.
    • Convert XML to JSON writes attributes as @name, text beside elements as #text and repeated elements as lists.
    • Make an XML Schema (XSD) from XML finds optional and repeating elements, required attributes and types (boolean, integer, decimal, date, dateTime, string) in your example.
    • Make sample XML from an XML Schema writes every element once with an example value, the first allowed value of a list, or the fixed or default value.

    Validation on the server

    The server checks XML against XML Schema 1.0 or 1.1 (with the xmlschema library) or against a DTD, and lists every problem with its line. Schemas that import other schemas need those files too: nothing is fetched from the internet, and entities are not loaded.

    The server can convert large XML files to JSON, CSV, Excel or YAML, run XPath queries and compare two large documents. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

    Good to know

    • Well-formed and valid are different. Well-formed means the text follows the writing rules of XML. Valid means it also follows a schema.
    • A schema made from one example allows only what the example shows. Read it and widen it where your documents differ.
    • To make classes for a programming language, turn the XML into JSON here and give that JSON to the Data Model Code Generator.

    Related tools