DataToolsLab

XML Tools

Read a document instead of scanning it: pretty-print it, check that it is well-formed, validate it against a DTD or an XSD, query it with XPath, diff two versions structurally, or flatten it into CSV or YAML. Every parser here is written against the XML specification and runs in the page, so confidential documents stay on your device and the tools work offline.

Most popular

Format & Clean

Inspect & Query

Compare & Convert

Schemas & Validation

All tools

About XML Tools

XML rewards precision and punishes guessing. Whitespace between elements is insignificant — until it is inside mixed content; an unprefixed attribute has no namespace; a DOCTYPE is not inert if your parser resolves entities; and a feed with duplicate GUIDs looks fine and silently fails in readers. These tools make each of those facts visible. The parser, the XPath 1.0 engine, the DTD and XSD validators, the structural diff and the encoding repair are all written from the specifications and run locally, so a result comes with the reason behind it rather than a bare pass or fail. The schema tools state which constructs they implement and which they do not, the XXE checker reports what a document asks a parser to do without ever doing it, and the converters preserve the element/attribute distinction instead of flattening it away.

Related categories

Frequently asked questions

Is my XML uploaded anywhere?

No. Parsing, validation, querying, formatting and conversion all run in your browser — the pages never make a request with your document, and they keep working with the network switched off. That also means no external DTD, schema or stylesheet is ever fetched, which is why the DTD and XSD tools ask you to paste the content instead of pointing at a URL.

How complete are the DTD and XSD validators?

They are honest subsets. DTD content models, attribute types, ID uniqueness and IDREF resolution are implemented; conditional sections and parameter-entity substitution are not. For XSD, element and attribute declarations, sequence/choice/all, occurrence, simple types with facets and simpleContent extensions are implemented; include/import, substitution groups, identity constraints and XSD 1.1 assertions are not. Each page lists what it covers so a pass is a signal rather than a false assurance.

Why does formatting sometimes leave part of the document alone?

Because whitespace is content in mixed content. In `<p>Hello <b>world</b></p>` the space before `<b>` is part of the text, so re-indenting the markup would change what a consumer sees. The formatter indents element-only content and leaves mixed content and xml:space="preserve" subtrees exactly as they were.

Can I convert between XML and JSON here?

Those two directions already live in the JSON category, alongside YAML↔XML and CSV→XML, and are not duplicated here — this category is everything XML needs around them: formatting, validation, querying, diffing, splitting and merging, plus conversion to CSV and YAML.

What should I use to check security-sensitive XML?

The XXE Risk Checker, before the document reaches your parser. It reports external and parameter entities, an external DTD subset and XInclude without resolving or executing anything, and lists the parser settings that remove the exposure. Treat any pass as specific to the document you pasted, not as a statement about your application.

Online