About XML Formatter
An XML formatter helps whenever XML arrives as one long line: a sitemap you're about to submit to Google Search Console or Bing, an RSS feed that won't validate, an SVG exported from a design app, or a config file such as a pom.xml or an Android layout. Paste the XML or open a file, and it's checked and formatted as you type.
The check uses your browser's built-in XML parser. If the document isn't well-formed, you see the error with its line and column, which usually points to an unclosed tag, an unescaped ampersand or a missing quote. Valid XML is indented with 2 spaces, 4 spaces or tabs, keeping comments, CDATA sections and processing instructions, while Minify strips whitespace and comments instead. This is a well-formedness check, not validation against a DTD or XSD schema. For sitemaps, the Sitemap Checker also tests the URLs inside. Nothing is uploaded.
How to use XML Formatter
- 1Paste your XML
Paste the XML or open a file such as sitemap.xml or an SVG.
- 2Fix any error
If the XML isn't well-formed, go to the line and column the XML formatter shows.
- 3Pick a layout
Choose 2 spaces, 4 spaces or tabs, or tick Minify.
- 4Copy or download
Copy the result or download it as a file.
Why use Cubfile for this
- Error line and column
The browser's XML parser locates syntax errors for you.
- Nothing dropped
Comments, CDATA sections and processing instructions stay in the formatted output.
- Pretty-print or minify
Indent with 2 or 4 spaces or tabs, or tick Minify to strip whitespace and comments.
- Any XML
SVG files, RSS feeds, sitemaps and config files all work.