Skip to content
Format XML

Free online XML well-formedness checker

Validate XML instantly, line & column

Paste or drop an XML document up to 5 MB and get immediate feedback: if the markup is well-formed you see element and attribute counts; if not, you get the exact error type, line, column, and the source line that caused it. No signup, no upload, nothing to install.

  • 100% free
  • No signup
  • Up to 5 MB
  • Line + column errors
  • Runs in browser
Formatted XML

The formatted result appears here.

Paste XML, drop a file, or press Ctrl+V anywhere on this page.

How to validate XML online

Three steps — paste, read the result, fix and repeat. No signup, no install.

  1. Paste or open your XML

    Paste the markup into the left panel, drag a file onto the editor, or press Ctrl+V (⌘V on Mac) anywhere on the page to load a file from the clipboard. Documents up to 5 MB are accepted — .xml, .xsd, .xsl, .svg, .rss, .plist, and every other XML dialect.

  2. Read the validation result

    The status bar below the panels reports the outcome instantly. If the document is well-formed, you see the element count, attribute count, and maximum nesting depth. If there is an error, you get the type (mismatched tag, unclosed element, duplicate attribute, etc.), the exact line and column, and the offending source line.

  3. Fix the error and re-check

    Edit the XML directly in the left panel or fix it in your editor and paste again. Validation re-runs on every keystroke, so you can work through a chain of errors without pressing a button.

Technical specifications

ChecksWell-formedness: tag matching, attribute quoting, duplicate attributes, unterminated constructs
Accepted inputAny XML — .xml, .xsd, .xsl/.xslt, .svg, .rss, .atom, .wsdl, .kml, .plist, .config, pom.xml
Error detailError type, line number, column number, and offending source line
Maximum document size5 MB, about 150,000 lines
Also formatsBeautify (2 spaces, 4 spaces, or tab) and minify to one line
Processing locationYour browser — the XML is never uploaded to a server
PriceFree, no signup, no limit on the number of documents
Works offlineYes, once the page has loaded

Frequently asked questions

What does this XML validator check?

It checks XML well-formedness — the rules defined in the XML 1.0 specification. That covers mismatched and unclosed tags, unquoted or missing attribute values, duplicate attributes on the same element, unterminated comments, CDATA sections, and processing instructions. It does not validate against an XSD or DTD schema; for that you need a schema-aware validator.

How is this different from an XML formatter?

A formatter re-indents valid XML so it is easier to read. This page does that too, but the focus is on the error report: you get the error type, the line number, the column, and the source line itself. If you only need pretty-printing, the homepage at format-xml.com does the same job with a formatting-first interface.

Is my XML uploaded to a server?

No. The parser runs entirely in JavaScript inside your browser tab. Nothing is sent over the network, which also means validation keeps working after you go offline.

What is the maximum file size?

5 MB per document, roughly 150,000 lines of typical markup. A 2 MB file validates in well under a second on an average laptop. Above 5 MB the tool asks you to split the document to avoid freezing the browser tab.

Can I validate SVG, RSS, SOAP, or Maven pom.xml?

Yes. Every XML dialect is parsed the same way — SVG artwork, RSS and Atom feeds, SOAP envelopes, WSDL, XSD schemas, Android layouts, and .plist files. The XML declaration, DOCTYPE, CDATA, processing instructions, namespace prefixes, and entities are all handled.

Does it catch namespace errors?

It catches undeclared namespace prefixes at the well-formedness level — for example, using a prefix without a matching xmlns declaration. Full namespace-constraint checking (duplicate namespace bindings, namespace-well-formedness as defined in Namespaces in XML 1.0) is not performed.

Why does my XML pass here but fail in another validator?

Most likely the other validator is checking schema validity (XSD or DTD), not just well-formedness. A document can be perfectly well-formed XML yet violate the rules in a schema. This tool only checks well-formedness — whether the XML syntax itself is correct.

Well-formedness vs. schema validation

XML well-formedness is the baseline: every opening tag has a matching close, attributes are quoted, and constructs like comments and CDATA sections are properly terminated. This is what the parser on this page checks. A document that passes is guaranteed to be consumable by any compliant XML processor.

Schema validation goes further — it verifies that element names, nesting order, and attribute values match the rules in an XSD, DTD, or RELAX NG schema. That is a separate step and is not performed here. If you need schema validation, feed the document to a tool like xmllint --schema or an IDE with schema support after confirming well-formedness here.

Need to pretty-print your XML once it passes validation? The XML formatter on the homepage re-indents it with your choice of spacing.

Where your XML is processed

Everything happens in the browser tab you are reading this in. The document you paste is parsed and checked by JavaScript on your own machine and is never uploaded, logged, or stored — which is also why validation keeps working after you disconnect from the internet.