ZYBERMART

Install ZYBERMART

Open every tool from your home screen or dock, in its own window. Tools you've used also work offline.

XML Formatter

Format XML with clean indentation or minify it, and check that it's well-formed, with the line of any error.

How to format XML

  1. Paste your XML: a sitemap, RSS feed, SVG, config file, SOAP message or any other XML.
  2. Choose Format to indent it with one element per line, or Minify to put it on one line.
  3. If the XML isn’t well-formed, the error tells you which line to fix.

Common XML errors

  • A tag isn’t closed: every <item> needs a </item>, or write it as <item/>.
  • A bare & or < in text: write &amp; and &lt;, or wrap the text in <![CDATA[ … ]]>.
  • More than one root element: wrap everything in a single outer element.
  • Unquoted attributes: id=5 must be id="5".

Frequently asked questions

Does it check that my XML is valid?

It checks that the XML is well-formed: every tag is closed, tags are nested properly, attributes are quoted and there's one root element. If not, it shows the browser's error with the line to look at. It doesn't validate against a schema (XSD or DTD).

Are comments and CDATA kept?

Yes. Comments, CDATA sections, processing instructions and the XML declaration are kept when formatting. Minify can remove comments too.

What does minify do?

It removes the whitespace between tags, and optionally comments, to make the file as small as possible. Text inside elements is kept exactly.

Is my XML uploaded?

No. Formatting runs in your browser, so it's fine for config files, sitemaps, feeds and SOAP messages with private data.

Sign in to ZYBERMART

Keep your CVs, invoices, flashcards, notes and saved tools on all your devices. It's free, and the tools work the same without an account.

or

No password needed. By signing in you agree to the terms; see how we handle your data in the privacy policy.

Your account

Signing out keeps a copy of your work in this browser. On a shared computer, clear your browser data afterwards.

What do you want to create?

Designs

Social media

Documents

Study

Edit

See all 241 tools