XML Formatter
Free online XML formatter with two-space indent, preserved attributes, comments and CDATA, plus line-numbered errors.
Data handling: common local tools process inputs in your browser; network queries, server execution and optional AI follow their separate data-use notes.
What is XML Formatter?
Working with SOAP payloads, Maven pom.xml files or Android layouts, single-line XML is nearly unreadable. This tool formats XML with a clean two-space indent per level, fully preserving attributes, comments and CDATA; parse failures are reported with an exact line number. Reverse minification is supported too.
How to Use
- Paste XML content
- It formats automatically
- Copy the result
FAQ
- Is CDATA preserved?
- Yes. CDATA blocks are kept as-is — never escaped or split.
- What if formatting fails?
- Check the reported line number for common errors such as unclosed tags or unquoted attributes.
Related Tools
JS / TS FormatterFree online JavaScript and TypeScript formatter powered by Prettier, with JSX/TSX support and reverse minify — local.CSS FormatterFree online CSS formatter based on Prettier: restore single-line stylesheets to readable indented CSS, or minify.HTML FormatterFree online HTML formatter based on Prettier: re-indent tags, normalize attributes, format embedded script and style.SQL FormatterFree online SQL formatter for MySQL, PostgreSQL, SQL Server and SQLite: uppercase keywords and indented subqueries.JSON Formatter & ValidatorFree online JSON formatter and validator with inline error hints, collapsible tree view and in-browser processing.JSON Diff & CompareFree online JSON compare tool: ignores key order, listing added, removed and changed fields by path — all local.
Last updated 2026-09-15