Skip to content
Created by Iternal Technologies, the AI Strategy ExpertsBy Iternal (opens in a new tab)

Format & Minify

XML Beautify

XML

Paste well-formed XML. Nested elements are indented with two spaces as you type.

Indented XML

About XML Beautify

XML Beautify lays a well-formed document out with a newline and two spaces for each nested element. Paste a one-line feed, a config file or a SOAP body and each element that contains only markup sits on its own line.

Text that contains anything other than spaces, tabs and line breaks is kept character for character, including inside attribute values, comments and CDATA. Pure gaps between tags are replaced by the indent. The five predefined entities are not expanded.

A DOCTYPE is rejected rather than resolved, and the document must have a single root element. Swap sends the indented result to XML Minify. Formatting runs in your browser and the text you paste is never uploaded.

Frequently asked questions

What does XML beautify do?

It inserts a newline and two spaces of indent for each element whose children are only elements, comments, CDATA or processing instructions. Text, attribute values, comments and CDATA are not rewritten.

Which whitespace does beautify change?

Only text that is nothing but spaces, tabs and line breaks between tags. A text node that contains any other character, including spaces around a word, is left unchanged. Indent is always two spaces.

Why is a DOCTYPE rejected?

A DOCTYPE can declare entities and change how markup is read. This tool does not resolve DTDs, so the declaration is rejected instead of being ignored or fetched.

Which character references are kept?

The five predefined entities amp, lt, gt, quot and apos are accepted and left as written. Numeric character references are accepted and not turned into characters. Any other name is reported as an unknown entity.

Is the text I paste uploaded anywhere?

No. Formatting runs in your browser and the text you paste is never uploaded, logged or stored. Google Analytics records page views and feature use, never content.

Iternal · AI Blueprint Builder

Plan the AI initiative, not just the output

The AI Blueprint Builder scores each use case across value, feasibility, cost, governance, risk, adoption and readiness before you commit budget. Free to start, about 60 minutes.

Open the AI Blueprint Builder (opens in a new tab)