XML Formatter
Read parent and child elements in a one-line XML response. Formatting, minification, syntax checking and a structure view are available.
Understand the input and result
<order><id>A17</id><paid>true</paid></order><order>
<id>A17</id>
<paid>true</paid>
</order>Reading the result
Indentation separates id and paid inside order. The text true is not checked against an XML Schema boolean type: matching tags and checking business meaning are different tasks.
Common mistakes
Whitespace may be significant in mixed text and tags. Compare such documents with the original. DOCTYPE, custom entities and XSD or DTD validation are not supported.
Examples were checked against this tool's processing behavior. Review whether the meaning and format fit your own input.
XML Formatter guide
How to use it
- Paste the input on the left or use Open file to load a UTF-8 text file. Provide the content to process, without unrelated logs, HTTP headers or explanations. For comparison, enter one JSON document in each input area.
- Choose the action and options in the middle and press Run. If an error appears, correct the original input and try again. You can edit input and options during processing; a result from an older input will not be applied to your new input.
- The original stays on the left and the result appears on the right. Use Copy or Download to take it to your next task. Editing input or options clears the previous result. Reset clears both areas while keeping your options. Structure views allow tree entries to be expanded and collapsed.
How it works and what to keep in mind
XML validation does not validate XSD/DTD and rejects DOCTYPE and custom entities. XML values are read as strings, attributes use @_ and text uses #text. HTML validation uses html-validate recommended rules; previews do not execute scripts or external resources. Structure views and conversions may not preserve original numeric spelling or comments. XML formatting and minification may change text whitespace. Review mixed content and documents where whitespace has meaning, such as those using xml:space.
Input and results are processed in your browser without being uploaded or saved. Open file accepts UTF-8 text files up to 2 MB. These tools handle syntax and data representation; they do not guarantee business-rule validity, security or production readiness. Language and theme changes preserve your current input and options, but reloading clears work data.
Use the header buttons to switch languages or light and dark modes instantly. Switching keeps your input, results and running state. Your language and theme choices also apply on later visits and when you navigate to another page.