Skip to content
ToolsOnDuty - free online tools
Developer Tools

XML Formatter & Validator

Format messy XML and check that it is well-formed.

Free browser toolRuns in your browserNo sign-up
Markup validation studio

Validate XML structure before you trust the formatting

Parse XML with the browser XML engine, surface well-formedness errors and only generate indented output after validation succeeds.

Waiting

status

0 B

input size

—

output size

XML input

0 characters

Formatted XML

No output yet
Source input is preserved until you explicitly replace it.
Private by design. Input is processed inside this browser tab and is not sent to ToolsOnDuty.

About the XML Formatter & Validator

XML is a tag-based format for structured data, used in configuration, feeds, documents and many APIs.

Paste XML and this tool indents it into a clean, readable structure and checks that it is well-formed, pointing out errors if the tags do not match.

Formatting and validation happen entirely in your browser, so your data is never uploaded.

Key features

  • Beautify and indent XML
  • Well-formedness validation
  • Clear error messages
  • Copy and explicit .xml download
  • Runs entirely in your browser

How to use

  1. 1Paste your XML into the box.
  2. 2Run Validate & format.
  3. 3Fix any browser XML-parser error before output is generated.
  4. 4Copy or download the well-formed, indented result.

Examples

Format compact XML
Input: <root><item>1</item></root>
Output: Indented XML with root and item on separate lines

Formatting changes whitespace between elements, not their values.

Frequently asked questions

Does it check against a schema (XSD/DTD)?
No. It checks that the XML is well-formed, meaning the tags are correctly nested and closed. It does not validate against a specific schema.
Is my XML uploaded?
No. Formatting and validation run entirely in your browser.
Can it minify XML too?
No. This workflow validates and indents XML. It does not currently provide a minification mode.

Open a related tool to prepare your files or refine the finished result.