XML Validator
Checks XML for well-formedness and explains each syntax error.
Indent messy XML so it is easy to read, or minify it to a single line. Comments, CDATA, and the XML declaration are kept exactly as they are.
.xml file, or drop one onto the box.The formatter reads the XML into a tree, checks that it is well-formed, and writes it out again.
<name>Ada</name>.<p>Hello <b>world</b></p>, its content is left as written, because adding line breaks there would change the text.&, comments, and CDATA sections are copied without change.Input:
<?xml version="1.0"?><catalog><book id="b1"><title>XML Basics</title><price currency="USD">29.99</price></book></catalog>
Beautified with 2 spaces:
<?xml version="1.0"?>
<catalog>
<book id="b1">
<title>XML Basics</title>
<price currency="USD">29.99</price>
</book>
</catalog>Minifying the beautified version gives back the one-line input.
<br> is rejected; use the HTML Formatter for HTML.No. Only whitespace between tags changes. Text, attributes, comments, and CDATA stay exactly as they were, and mixed text content is not reflowed.
Beautify adds line breaks and indentation so people can read the XML. Minify removes that whitespace to make the file smaller for storage or transfer.
It is not well-formed. Common causes are a missing closing tag, an unescaped &, or unquoted attribute values. The error shows the line and column; the XML Validator explains the fix.
No. Formatting runs in your browser.
Often used together with the XML Formatter.
Checks XML for well-formedness and explains each syntax error.
Converts XML into readable JSON, with attributes and repeated elements handled.
Beautifies HTML with consistent indentation, including inline CSS and JavaScript.