How to Use the XML Formatter Online
- 1Paste the XML fragment you want to read. Include the enclosing element when its position matters, and keep the declaration if you are reviewing a full document.
- 2Set the indentation width to two or four spaces to match the surrounding source or the fixture you are preparing.
- 3Compare opening and closing tags at the same indentation level. Check which child elements are grouped under the same parent.
- 4Copy the result for review. If you intend to send it to a parser or an integration, check any elements whose content includes significant whitespace.
Input & Output Examples
The feed, item, and title become separate levels, and the item keeps its id attribute.
<feed><item id="7"><title>Release notes</title></item></feed><feed>
<item id="7">
<title>
Release notes
</title>
</item>
</feed>The declaration remains at the top. The self-closing cache element aligns with the following name element.
<?xml version="1.0"?><config><cache enabled="true"/><name>demo</name></config><?xml version="1.0"?>
<config>
<cache enabled="true"/>
<name>
demo
</name>
</config>Practical Developer Workflows
- Compare two feed entries by expanding their titles and other child elements before reviewing differences in the source.
- Inspect the nesting of a sitemap record copied from a compact export without loading the full document into an editor.
- Prepare a small XML fixture for a test or code review where a reader needs to see the hierarchy at a glance.
Zero Server Uploads & Complete Privacy
Runs 100% in your browser; no data is uploaded to any server.
Let us know directly so our engineering team can fix it.