XML Formatter & Validator
Format & validate XML online
Pretty-print and validate XML with the exact error location highlighted. Comments and CDATA are preserved, and bare ampersands can be fixed in one click — all in your browser.
🔒 100% private — your document is processed entirely in your browser and is never uploaded, logged, or stored.
An XML formatter that pinpoints the broken tag
Paste your XML and Indentio re-indents it cleanly while keeping comments, CDATA, and declarations intact. If a tag is unclosed or mismatched, or an ampersand isn’t escaped, the exact line and column is underlined in red with a clear explanation — no more scanning thousands of lines by hand.
How to use it
- Paste or upload your XML (or a
.svg,.xsd,.rss…), or load theSample. - Well-formedness errors are underlined live — hover for the reason and a fix hint.
- Click Format to beautify or Minify to compact.
- Open Tree view to inspect elements and attributes, then Copy or Download.
Common XML errors it catches
- Mismatched tags —
<a><b>…</a>reports where the nesting breaks. - Unclosed elements — an element opened but never closed.
- Unescaped characters — a literal
&must be written as&. - Duplicate attributes on a single element.
- Multiple root elements — an XML document needs exactly one root.
Well-formed vs. valid XML
This tool checks whether your XML is well-formed — correctly nested tags, escaped characters, and a single root. That is what you need 99% of the time. Checking a document against a specific schema (DTD or XSD) is a separate step and is on our roadmap.
Frequently asked questions
How do I beautify XML?
Paste your XML and click Format. It is re-indented with your chosen indentation while comments, CDATA sections, and processing instructions are preserved exactly.
What counts as invalid XML here?
This tool checks well-formedness: mismatched or unclosed tags, an unescaped &, < or >, duplicate attributes, missing attribute values, and multiple root elements. Each is reported with its exact line and column.
Can it fix XML automatically?
It safely escapes bare & characters for you. Structural problems such as unclosed or mismatched tags are pinpointed with a clear message rather than rewritten — a wrong automatic guess would silently corrupt your document, so those are left for you to fix.
Does it support SVG, RSS, XSD and WSDL?
Yes — they are all XML dialects, so you can format and well-formedness-check any of them. Upload a .xml, .svg, .xsd, .wsdl, or .rss file directly.
Is my XML sent anywhere?
No. Everything is processed in your browser. Your XML is never uploaded, logged, or stored.