Developer

XML Formatter

Beautify and minify XML instantly.

This free XML formatter beautifies XML with clean, consistent indentation or minifies it to a single line, with an adjustable indent of 2, 3 or 4 spaces or a tab. Paste text, upload a file, or drag one in. Unlike simple regex formatters, it parses your document with the browser's own XML engine and pretty-prints from the parse tree, so attributes, comments, CDATA sections, processing instructions and mixed content all survive formatting intact. Invalid XML is reported with the exact line and column plus a caret under the offending character. A collapsible, syntax-highlighted tree view lets you explore large documents, and a stats bar shows byte size, element and attribute counts, and nesting depth.

Related tools