All guides

How to format XML online

Indent and validate XML in your browser with Toolora’s XML Formatter.

When you need an XML beautifier

SOAP responses, Android layouts, RSS, and config files are easier to inspect when tags are indented. Toolora formats XML locally.

Steps

1) Open XML Formatter at /tools/xml-formatter. 2) Paste XML in the left pane. 3) Copy the indented result — it updates as you type. Invalid XML shows a syntax-error banner on the output pane. Convert to JSON with XML ↔ JSON Converter at /tools/xml-json-converter when you need objects. HTML Formatter is for HTML, not XML namespaces.

Worked example

A minified SOAP envelope becomes nested tags you can scan. A missing closing tag fails instead of inventing structure. RSS and Android layout XML both indent. Attributes stay on the opening tag. This is not an XSD validator.

Privacy

Documents stay in the tab. Related: /tools/xml-json-converter, /tools/html-formatter, /tools/json-formatter.

Common mistakes

Pasting HTML5 with unquoted attributes or void tags without a closing slash can look “fine” in a browser and still fail an XML parse — use HTML Formatter for HTML. A UTF-8 BOM at the start of a SOAP dump is a frequent false invalid. Pretty-print does not validate against an XSD or DTD. Namespaces stay in the tags; this page does not rewrite xmlns. If you only needed objects, convert with XML ↔ JSON after the document parses. Large multi-megabyte logs may hitch the tab; split the envelope first. Close the page if the XML contains internal hostnames or credentials in attributes.