Format, minify and validate XML, and explore it as a tree. Errors show the exact line and column.
More:HTML MinifierJSON BeautifierHTML EntitiesRegex Tester
Your XML is checked with the browser's own XML parser, so errors show the exact line and column. The result is always valid XML: special characters are escaped, and comments, CDATA sections, processing instructions and the <?xml?> declaration are kept. Text is never changed: elements that contain text stay on one line, and xml:space="preserve" sections are left exactly as written. Everything runs in your browser.
Paste XML, open a .xml file or drop one in. Format mode indents the document with 2 spaces, 4 spaces or tabs. Minify mode removes the whitespace between elements to make it as small as possible. The result is checked so it is always valid XML. Text content is never changed: elements with text stay on one line exactly as written, and elements marked xml:space="preserve" keep their spacing. CDATA sections, processing instructions, the XML declaration and the DOCTYPE are kept. Comments can be kept or removed. If the XML is not well-formed, the error shows the line and column, and "Show in input" jumps to it. Tree view shows elements, attributes and text as a collapsible tree. Everything runs in your browser.
No. Element names, attributes and text are kept exactly. Only the whitespace between elements changes.
CDATA sections are always kept. Comments are kept unless you turn off "Keep comments".
XML must be well-formed: every tag closed, attributes quoted, one root element and special characters such as & written as &. The error shows where the first problem is.