XML formatter and validator
Paste XML to indent it neatly, minify it, or check that it is well-formed. If it is not, you get the line, the column and the reason, and can jump straight to the problem.
- ๐ Runs on your device
- โค 0 bytes uploaded
- โ Free, no sign-up, no watermark
How to use XML Formatter
- Paste XML or open an .xml, .svg or other XML file.
- Choose 2 spaces, 4 spaces, tabs or Minify.
- If there is an error, press Go to the error.
- Copy or download the result.
About XML Formatter
The XML is read by your browser's own XML parser (DOMParser), the same one browsers use for SVG and RSS. Error messages come from that parser, so the wording differs slightly between Chrome, Firefox and Safari.
Is it private?
Yes. XML Formatter runs entirely in your web browser: what you type into it is never sent to Nolo or anyone else, and the page's security policy only allows it to talk to nolotools.com. The site sends only two small things: the words typed in the optional search box, to find a tool, and, the first time you use a tool on a page, that tool's name for an anonymous daily count of tool use (nothing about you, your files or what you typed). Nothing is stored either: close the page and it is gone. How Nolo works.
Questions and answers
Is my XML sent to a server?
No. Everything runs in your browser and your XML never leaves your device. The page is not allowed to talk to any other site, so it is safe to use with real data and secrets.
Does it validate against a schema (XSD or DTD)?
No. It checks that the XML is well-formed: tags are closed and nested correctly, attributes are quoted, and there is one root element. Checking against an XSD or DTD is not supported.
Can formatting change my data?
Only whitespace between elements changes. Elements that mix text and tags, such as <p>Hello <b>you</b></p>, are kept on one line exactly as written, and xml:space="preserve" is respected, so meaningful spaces are never touched.
Are comments, CDATA and the XML declaration kept?
Yes. Comments (unless you turn them off), CDATA sections, processing instructions, the DOCTYPE and the <?xml ?> declaration are kept.
Why do some characters change to & or <?
They are the same characters, written in the standard escaped form. Character references such as é are written as the character itself.