RSS and Atom feeds
Feeds are generated by templates and arrive on one line. Formatting is the quickest way to check that
every <item> has the elements a reader needs.
Format XML, RSS feeds, sitemaps and SVG. The check names every unclosed or mismatched tag by line, including the case mismatches that catch people out.
HTML forgives a missing </li>. XML forgives nothing: every element must be
closed, tag names are case-sensitive, and <Item> is a different element from
<item>. That strictness means a well-formedness check on XML is genuinely conclusive.
This tool formats XML, RSS and Atom feeds, SVG files, XML sitemaps, SOAP envelopes, Android layouts, Maven POM files and configuration in any XML dialect. It preserves CDATA sections, processing instructions and namespace prefixes exactly.
Self-closing tags keep their slash: <br/> stays <br/>, because in
XML dropping it would turn the element into one that swallows the rest of the document.
Feeds are generated by templates and arrive on one line. Formatting is the quickest way to check that
every <item> has the elements a reader needs.
Search Console rejects a sitemap on a single parse error and does not always say where. Format it, check it, then resubmit.
Exported SVG is one long line full of editor metadata. Formatting it is the first step to trimming it down by hand.
SOAP and older REST services still return XML. Formatting an error response is often the only way to find the fault string buried in it.
Maven, Spring, Android manifests, .NET config. All XML, all easier to edit with real indentation.
A .docx or .xlsx is a zip of XML files. Unzip one and format the parts to see how the document is actually built.
These two words mean different things in XML and the distinction matters.
Well-formed means the syntax is correct: tags closed, correctly nested, one root element, attributes quoted. That is what this tool checks, and nothing can process your XML until it passes.
Valid means the document also conforms to a schema — a DTD, an XSD or a RELAX NG grammar — that says which elements may appear where, in what order, with which attributes. Checking that requires the schema, and this tool does not do it.
For RSS specifically, the W3C Feed Validation Service checks both syntax and feed-specific requirements, and is worth running before you publish a feed.
XML reserves five characters. Inside element text or an attribute value they must be escaped, or the parser will read them as markup:
| Character | Escape as | Required where |
|---|---|---|
| < | < | Everywhere |
| & | & | Everywhere |
| > | > | Everywhere, by convention |
| " | " | Inside double-quoted attribute values |
| ' | ' | Inside single-quoted attribute values |
The alternative is a CDATA section — <![CDATA[ ... ]]> — which tells the parser to take
everything inside literally. That is how RSS feeds carry HTML inside a description. This tool leaves CDATA
blocks completely untouched. The entity encoder will escape a block of
text for you if you would rather not use CDATA.
Almost always case. XML is case-sensitive, so <Title> and </title> are different elements. HTML does not care, which is why people coming from HTML hit this constantly.
Yes — SVG is XML. Self-closing tags are preserved, attributes and namespaces are untouched, and the result renders identically. It is the easiest way to make an exported SVG editable by hand.
No. That requires loading the schema and is a different class of tool. This checks well-formedness, which is the prerequisite — nothing can validate against a schema until the document parses.
Both are preserved exactly. The <?xml ... ?> declaration stays on the first line, and namespace prefixes and xmlns attributes are passed through untouched.
You can, but you will get a long list of complaints about unclosed <li>, <p> and <br> elements that are perfectly legal in HTML. Use the HTML formatter for HTML — it applies the right rules.
Indent and structure any HTML file.
OpenTurn minified HTML back into readable code.
OpenPretty-print HTML with the indent you want.
OpenFormat, inspect and repair JSON.
OpenLay out stylesheets with consistent indentation.
OpenBeautify minified or messy JavaScript.
OpenLonger reading on formatting, indentation and minification.