Practical example
Format an API document and verify namespaces on every prefixed element; identical local names can mean different things under different namespace URIs.
Paste XML and instantly format, minify, or validate it locally in your browser.
An XML formatter makes XML easier to read by adding indentation and line breaks.
An XML validator checks whether your XML is well-formed and helps catch syntax issues such as broken tags, invalid nesting, or malformed declarations.
Learn the workflow behind this tool and what to check next.
Readable indentation does not validate namespaces, schema rules, encoding declarations, entity handling, or application-specific meaning.
Verify namespace URIs, prefixes, default namespace scope, qualified attributes, and XPath queries after formatting.
Preserve significant text, xml:space rules, CDATA boundaries, and mixed-content elements where indentation changes data.
Keep the declaration aligned with actual bytes and handle entities, DTDs, and external resources with secure parser settings.
Validate against the required XSD, DTD, or application contract and test the final serialized document with the receiver.
Format an API document and verify namespaces on every prefixed element; identical local names can mean different things under different namespace URIs.
DTD and external entity processing can be unsafe. Do not enable network entity resolution for untrusted XML.
Pretty printing can change whitespace inside mixed-content elements, so keep the original when whitespace is semantically meaningful.
You may also find these tools useful.