XML Formatter & Validator
Format, validate and explore XML as a tree, or convert it to JSON, CSV and YAML.
Three steps, no reading required.
Paste your input
Drop text, code, or data into the input pane — from an API response, a file, anywhere.
Pick a mode
Toggle the modes above the output. The result updates instantly as you type.
Copy the result
Grab the output with Copy or Download, or fix the error shown if the input is invalid.
Try it with a sample.
<note><to>Dev</to><from>DevUtilsNow</from><body>Format me!</body></note>
Invalid XML, no explanation
- Says "error" without saying where
- Uploads internal config or SOAP payloads
- Beautify only, or minify only
Errors with a location
- Shows the parse error and, where the browser provides it, the location
- Beautify, minify, tree view, sort keys, or convert to JSON, CSV or YAML
- Parsed in your tab; nothing leaves it
Questions worth answering upfront.
No. XML formatting and validation run entirely in your browser. Your document never leaves your device.
Yes. When XML is malformed the tool shows the parse error and, where the browser provides it, the location of the problem.
Yes. You can collapse an XML document to remove insignificant whitespace as well as beautify it with indentation.
Indent sets 2 spaces, 4 spaces or tabs for the formatted output. Sort keys orders each element's attributes, and its child elements, alphabetically by name. Elements that mix text and tags keep their original order, because reordering them would change the content.
Yes. Pick JSON, CSV or YAML above the output. Attributes become keys starting with @, mixed text becomes #text, and repeated elements become arrays. For CSV, the first repeated element (for example each <book> in <books>) becomes a row, and nested elements become dot-separated columns.
Yes. Every tool on DevUtilsNow is free, with no account and no usage limits.
In VS Code, install an XML extension (such as the one by Red Hat) and run Format Document with Shift+Alt+F. In Notepad++, install the XML Tools plugin and choose Plugins › XML Tools › Pretty print. For a one-off file, paste it here instead; there is nothing to install.
People who use this also reach for
Guides that pair with this tool
How to Format and Validate XML
What makes XML well-formed, the rules parsers enforce, and how to format messy XML and catch errors.
Need another tool?
36+ browser-based utilities — all free, all private, nothing to install.