Skip to content
Input
XML
Limit
1 MiB
Runtime
Browser

Format XML while respecting mixed content

Parse one XML 1.0 document and produce readable indentation without treating text-bearing mixed content as disposable layout.

Local processingNo sign-upNo network access

Format XML

Inputs are limited to 1 MiB and stay in this browser tab.

Paste or edit the source. Tool Swim does not upload or save it.

Formatted XML

Nothing is placed in a URL, account, or remote log.

What this tool does

XML 1.0, bounded, and local

XML whitespace can be either presentation or data. Formatting therefore follows the parsed node structure and avoids inventing line breaks where element and text nodes are deliberately interleaved.

Well-formed input comes first

The formatter checks matching tags, quoted attributes, legal names, character references, and the single-document-element rule before writing output. Invalid source remains available for correction.

Formatting is not canonicalization

Readable indentation does not create Canonical XML and should not be used for signature verification. Attribute order, namespace context, and application-specific whitespace still deserve review.

Primary references

Questions and answers

Related XML tools