What is it?
The XML Formatter makes XML readable or compact, checks it is valid, and converts XML → JSON or JSON → XML.
Who is it for?
Developers, Blogger theme editors, SEO people reading sitemaps and feeds, and anyone handling XML exports.
How to use it
Paste the XML (or JSON) and choose the mode: Format (beautify), Minify, XML → JSON or JSON → XML, and the Indent (2 spaces, 4 spaces or Tab).
Fixing “This is not valid XML”
- Every opening tag needs a closing tag (or must end with
/>), and tags must nest properly. - A bare
&must be written&, and<in text as<. - Attribute values need quotes; tag names are case-sensitive.
- Only one root element is allowed.
Uses
- Reading a sitemap.xml or RSS feed.
- Tidying a Blogger theme before editing (Theme → Edit HTML). Keep a backup and check the theme still saves afterwards.
- Turning an old XML API response into JSON for a modern app.
XML → JSON notes
Attributes and repeated elements have no single standard JSON shape, so check the result before using it in code. Comments are dropped.
Worked example
<note><to>Asha</to><from>Ravi</from></note> becomes nicely indented over four lines with Format, or {"note":{"to":"Asha","from":"Ravi"}} with XML → JSON.
Blogger theme tips
- Blogger themes are XML: an unclosed tag or a bare
&gives “The element type … must be terminated” or “Error parsing XML”. Paste the theme here to find the line. - Inside Blogger themes, write
&in URLs and<in inline scripts, or wrap scripts in CDATA. - Always download a backup (Theme → ⋮ → Backup) before editing.
Sitemaps
Paste a sitemap.xml to read it, or check that every <url> has a <loc>. A sitemap that isn’t valid XML is ignored by search engines.
Open the tool: XML Formatter
Still stuck?
Contact support. Tell us which tool or page you were using, what you tapped, what you saw, and your phone or computer and browser (for example: Android phone, Chrome). We reply by email.






























Questions, or an error not listed here?
Tell us in the comments: what you were doing, the exact message you saw, and your device and browser. We read every comment and add new fixes to this article.