XML Formatter
Turn a wall of XML into neatly indented, readable markup — and find out instantly whether it is well-formed, with the exact error if it is not.
How to use the XML Formatter
- Paste your XML.
- Choose the indent size.
- Press Format & validate, or Minify to strip whitespace, then copy the result.
About the XML Formatter
XML still powers sitemaps, RSS and Atom feeds, Android resources, Office documents, SOAP APIs and countless configuration files. A single unclosed tag or stray ampersand makes the whole document unreadable to software, so validation is the first step in debugging. This tool parses your XML with the browser’s own standards-compliant parser, reports the line and reason for any error, then re-indents the document so its structure is easy to follow. Short elements that contain only text stay on one line to keep the output compact.
Frequently asked questions
What does “not well-formed” mean?
The XML breaks a basic rule — an unclosed tag, mismatched names, an unescaped & or < in text, or more than one root element. The message shows where.
Does it validate against a schema (XSD)?
It checks that the XML is well-formed. Schema validation needs the XSD file and is not included.
Can I minify XML?
Yes — press Minify to remove whitespace between tags while keeping text content.
Is it safe for private data?
Yes. Parsing and formatting happen in your browser.
Related free tools
- YAML to JSON Converter — Convert YAML to JSON and JSON to YAML, with clear error messages.
- Cron Expression Generator — Build and explain cron schedules in plain English, with the next run times.
- Color Contrast Checker — Check text and background colours against WCAG AA and AAA — with a fix suggestion.
- Meta Tag Generator — SEO title, description, Open Graph & Twitter tags — copy-ready.
- What Is My IP — Your public IP address, browser & device details.
- JSON Formatter — Beautify, minify and validate JSON instantly.
Runs in your browser — what you enter stays on your device. Published .