Paste a complete XML document into the input editor, choose the indentation, and press Format. The tool first checks well formedness with the browser's XML parser. Correct any reported parse error before retrying, then compare the formatted output with your original. The example below keeps a simple document intact, giving you a small successful input to try before working with namespaces or larger nested structures.
Use Copy or Download only after reviewing the result. The formatter applies bounded transformations and preserves whitespace sensitive documents using xml:space rather than rewriting them aggressively. A well formed document is not necessarily valid against an XSD, DTD, or application contract. Those checks require the appropriate validator in your own workflow. Preserve the source when exact signatures, mixed content spacing, or external declarations matter.
Input: <root><count>2</count></root>
Output: <root><count>2</count></root>
Well formedness: valid XML
Processing runs in your browser. Choosing Share uploads the selected tool state; anyone with the link can open it. Signing in to save sends content to your account library and records save history. Review the selection before either action. Closing the page does not delete those copies. Copying locally does not create a server share.
Our formatter handles elements, attributes, namespaces, CDATA sections, comments, processing instructions, and XML declarations. It supports any well-formed XML document.
The browser reads and parses your document, so available memory and input complexity determine practical limits. No fixed processing time is promised. Try a smaller representative document when a large input is difficult to inspect. Formatting does not fetch schema definitions or provide server based streaming for arbitrarily large XML files.
No. Browser DOMParser checks well formedness before formatting, but this page does not validate an XSD, DTD, or your application’s requirements. A document can have balanced tags and still contain the wrong fields. Use the appropriate schema validator separately and check the consuming application before replacing its configuration.
An xml:space attribute indicates that whitespace can be significant. The conservative transformation therefore returns the source unchanged instead of rewriting its presentation. Keep an original copy when mixed content, signatures, external declarations, or byte identity matter. Formatting is not a canonicalization step and does not establish signature validity.