Encode text to Base64, with correct Unicode handling.
Open toolXML Formatter
Format, minify XML - with mismatched-tag detection and line/column errors.
Formatted result will appear hereWhat is a xml formatter?
This tool formats (beautifies) messy or minified XML with consistent indentation, minifies XML down to a single compact line, and validates that XML is well-formed - catching issues like mismatched or malformed tags with the exact line and column where the problem is.
How to use this tool
- 1Paste your XML, or upload an .xml file.
- 2Click Format to beautify with your chosen indent width, Minify to compress it, or Validate to just check it's well-formed.
- 3If there's a syntax error - like a mismatched closing tag - the exact line and column are shown.
- 4Copy the result or download it as a .xml file.
Common use cases
Frequently asked questions
What counts as 'well-formed' XML here?
Every tag must be properly closed and correctly nested - an opening tag needs a matching closing tag with the same name (or be self-closing), and tags can't overlap incorrectly. This tool checks exactly that.
Does it check XML against a schema (XSD/DTD)?
No - this validates that the XML is syntactically well-formed, not that it conforms to a particular schema. Schema validation is a separate, more involved kind of check.
What happens with CDATA sections and comments?
Comments are recognized and removed during formatting. CDATA content is preserved as raw text within its element.
Is my XML uploaded anywhere?
No - formatting, minifying, and validation all happen entirely in your browser.
{
"runs_in_browser": true,
"data_sent_to_server": false,
"signup_required": false,
"price": "free",
"category": "Encoding"
}