Logo

Free Online XML Formatter

Make your XML documents easier to read using this free online XML Formatter. Add your XML by typing, pasting, or uploading a file, then apply the formatting style that best matches your coding preferences.

When the process is complete, the formatted XML can be copied or downloaded for use in your projects. If the XML cannot be processed because of invalid xml document, check it first with our XML Validator before formatting.

XML Formatter
Formatted XML

XML Formatting Example

Input XML

<?xml version="1.0" encoding="UTF-8"?><catalog><book><id>101</id><title>Learning XML</title><author>Jane Smith</author><price>29.99</price></book><book><id>102</id><title>Web Development</title><author>Michael Brown</author><price>39.95</price></book><book><id>103</id><title>Programming Basics</title><author>Emily Davis</author><price>24.50</price></book></catalog>

Formatted XML

After formatting, the XML is neatly indented, making each element easier to read, review, and maintain.

<?xml version="1.0" encoding="UTF-8"?>
<catalog>
    <book>
        <id>101</id>
        <title>Learning XML</title>
        <author>Jane Smith</author>
        <price>29.99</price>
    </book>
    <book>
        <id>102</id>
        <title>Web Development</title>
        <author>Michael Brown</author>
        <price>39.95</price>
    </book>
    <book>
        <id>103</id>
        <title>Programming Basics</title>
        <author>Emily Davis</author>
        <price>24.50</price>
    </book>
</catalog>

Related Tools