XML Formatter
Format, beautify, and validate XML with proper indentation and tag nesting. Minify XML for production. Free online tool, 100% in your browser.
Reference
What is XML?
XML (Extensible Markup Language) is a markup language defined by the W3C for encoding structured data in a human-readable and machine-readable format. Unlike HTML, XML has no predefined tags — you define your own elements and attributes to describe any data structure. XML is widely used for configuration files (Maven pom.xml, Android AndroidManifest.xml, .NET .csproj), data interchange (SOAP, RSS, Atom feeds, SVG), and document formats (XHTML, DOCX, EPUB). Formatting XML with proper indentation makes deeply nested structures readable.
XML structure and syntax
Well-formed XML follows strict rules: every opening tag (<element>) must have a matching closing tag (</element>) or be self-closing (<element />). Tags are case-sensitive. Attributes must be quoted. There must be exactly one root element. Special characters (&, <, >, ", ') must use entity references. CDATA sections (<![CDATA[...]]>) allow embedding unescaped text. The XML declaration (<?xml version="1.0" encoding="UTF-8"?>) specifies the version and character encoding.
Privacy
All formatting and validation runs 100% in your browser. No XML data is sent to any server.