HTML to XML Converter

Convert HTML, Pug, Jade, JSX, BBCode, and structured data locally in your browser.

Making HTML well-formed XML

HTML allows unclosed tags such as <br> and attributes without values; XML does not. The converter parses the HTML like a browser, serialises it as XHTML (void elements self-close, boolean attributes get values, special characters are escaped) and checks the result with an XML parser. A fragment is wrapped in a <root> element: <p>One<br>Two</p> becomes <p>One<br/>Two</p>.