XML Formatter

Format XML with readable indentation and check for well-formed XML. Copy the result or download it as an XML file.

How to use it
Technical information
Supported formats
Paste source text in the input format shown on the tool.
Limits
Parsing depends on valid syntax. Rich formatting and format-specific features may have no equivalent in the destination.
If something goes wrong
Try a small sample first. Check delimiters, quotation marks and any reported parsing error before converting the full input.

Runs in your browser. Checks XML syntax. DTD and schema validation are unavailable.

Tool statusWorks in browserNo account neededCopy-ready result
My Tools

How to format XML

Paste the XML, choose two spaces, four spaces or tabs, and select Format XML. If the parser flags an error, check for mismatched tags, unquoted attributes, or raw ampersands.

Worked example

Load the catalog example to see its product name and price on separate lines. Elements with mixed text and tags, such as <p>Hello <b>world</b>!</p>, retain their spacing.

A well-formed result means the browser can parse the XML. A schema checker is needed to verify required fields or allowed values.