← All Tools

XML Formatter

Format, minify and validate XML markup. Syntax highlighting included.

XML Input

How to use the XML Formatter

  1. Paste your XML

    Paste XML into the input, or load the sample.

  2. Format, minify or validate

    Choose 2- or 4-space indentation, or minify it for the smallest size.

  3. Copy or download

    Copy the result or download it as an .xml file.

Frequently asked questions

How do I check whether my XML is valid?

Press Validate. Malformed XML — such as an unclosed or mismatched tag — is reported with the parser’s message.

What is the difference between format and minify?

Format adds indentation so the structure is easy to read. Minify removes whitespace between tags to make the file smaller.

Is my XML sent anywhere?

No. Formatting and validation happen in your browser.