XML Validator & Formatter
Validate XML and format its element structure.
Read the guideRun the tool
The calculation runs in your browser. This tool does not send your input to JVR Software.
More information
Back to the toolWhat it is and when to use it
XML Validator & Formatter helps you review the structure of an XML document. Use it for element-oriented documents such as sitemaps, configuration exports or small API responses. The tool can catch XML syntax problems and add indentation for reading.
How it works
The browser parses XML using an XML parser and serialises the resulting document, then indents elements for display. XML requires matching, case-sensitive opening and closing tags, a single document root and properly quoted attributes. Characters such as an ampersand can need an entity reference.
How to use it
- Paste the entire XML document, including its root element.
- Run the formatter and review the element nesting.
- If the output reports a parse error, check the first reported position for a mismatched closing tag, invalid entity or missing attribute quote.
Worked example
Paste <items><item id="1">Apples</item><item id="2">Pears</item></items>. The items element contains two item elements. The id attributes remain on their opening tags, which makes the parent-child structure easier to see.
Reading the result
Passing syntax validation means the XML is well formed. It does not mean it meets your supplier's required schema, includes the right namespaces or contains valid business data. Use an XSD validator when a schema is part of your exchange specification.
Common mistakes and limits
The result is a reading aid, not XML canonicalisation. Do not substitute it for a signed document or use it as a lossless processor for text-oriented mixed content. Indentation and serialization can change bytes and may affect significant whitespace.
In documents with mixed content, whitespace can be meaningful inside a paragraph or around inline elements. Preserve these original files and run a fixture comparison through the consuming system before committing a formatted copy to a config or feed.
