HTML Formatter
Beautify and indent HTML markup.
OpenLay out flat XML with one element per line so nesting errors and missing nodes stand out.
Cut the <?xml ... ?> line if your document starts with one.
Add the feed, SOAP body or config file to the input panel.
Elements are indented two spaces per level as you type.
Copy the result or download formatted.xml, then restore the declaration.
A partner sends a product feed or a SOAP response with no line breaks, and you need to check whether every item has a price element. Indenting the document turns that check from squinting into scrolling.
The XML formatter uses the same tag-aware indenter as the site's HTML formatter. Each element starts on a new line, children are indented two spaces, self-closing elements such as <item/> do not open a new level, and comments and CDATA sections are preserved. Element text is placed on its own line under the tag. Formatting is live, files can be dropped onto the input, and Download produces formatted.xml.
Two caveats are worth knowing. The XML declaration and other processing instructions (lines starting with <?) are not recognized as tags and lose their leading angle bracket, so cut the declaration before formatting and paste it back on top. And because text moves onto its own line, treat the output as a reading copy; whitespace-sensitive consumers may see extra spaces in values. If you need the data itself, convert it with XML to JSON, or build XML from an object using the JSON to XML converter. Sitemaps have a dedicated sitemap validator.
The document never leaves the browser while it is being indented, which matters for SOAP payloads that carry account numbers or tokens.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
The indenter treats names it knows as HTML void elements (link, meta, source, param and a few others) as having no children. In XML those can be normal containers, so their closing tag pulls the indent one level left. The content is unchanged; only the whitespace is off.
No. It indents whatever tags it finds and will not report a mismatched closing tag. Run the document through XML to JSON, which uses the browser's strict XML parser and stops with an Invalid XML message when the markup is broken.
Usually, but check text values. A short element like