XML Formatter & Validator

Turn a one-line XML file into an indented tree, or the reverse. The browser’s XML parser checks well-formedness and reports the first error it finds.

Runs entirely in your browser. Your input and files are not uploaded to any server.

How to use

  1. Paste XML.
  2. Choose Format or Minify and the indentation.
  3. Copy or download the result.

Examples

Sitemap

Check a sitemap.xml copied from a server and make it readable.

When formatting XML helps

Minified XML from an API response, a sitemap or a config file is hard to read and even harder to compare. Formatting it with consistent indentation makes the nesting visible, so a missing closing tag or a misplaced element stands out at once.

Minifying does the reverse and removes the whitespace between tags, which is useful for embedding XML in a request body or shrinking a file you ship. If your document depends on whitespace inside text elements, compare the minified output with the original before you use it.

Privacy

Your files and text stay in your browser while you use this tool, and ads or anonymous visit statistics do not receive them. Only your favorites and recent tools are saved on your device. Privacy policy

Want proof? Check it with your browser’s Network tab: How to check that a tool does not upload your files

Frequently asked questions

Does it validate against a schema (XSD)?

No. It checks that the XML is well-formed (tags are balanced, attributes quoted, one root element). Schema validation needs the schema file and a dedicated validator.

Are comments and CDATA kept?

Yes, both are preserved in format and minify mode.

XML Sitemap GeneratorPaste a list of URLs and get a valid, escaped sitemap.xml with optional last-modified dates.
SVG Preview & OptimizerPreview SVG files safely and shrink them by removing comments, editor metadata and whitespace, with optional number rounding.
Color Picker & ConverterPick a colour, convert between HEX, RGB and HSL, sample colours from an image or your screen, and check contrast against white and black text.
Search tools