</>
XML Formatter
Pretty-print and validate XML. Free, private and instant.
More developer toolsJSON Formatter & ValidatorJSON to CSV ConverterCSV to JSON ConverterBase64 Encode & DecodeURL Encoder & DecoderHTML Entity Encoder & DecoderRegex TesterUUID GeneratorHash GeneratorJWT DecoderUnix Timestamp ConverterCron Expression Explainer
Send this text toJSON Formatter & Validator
Recommended next stepsTakes about 10 seconds
{}Format, beautify, validate and minify JSON with clear error messages.JSON Formatter & ValidatorHow to use the XML Formatter
- Paste XML into the box.
- The indented version appears as you type, with Copy and Download .txt buttons.
- If the XML is not well formed, an error shows the line and column.
Example
Worked example (default sample, tested in the browser)
- Input: <root><item id="1"><name>First</name></item><item id="2"/></root>
- Result: Indented over several lines: root, item id 1 containing name First, then the empty item id 2
- Error: <root><a></root> gives: Opening and ending tag mismatch: a line 1 and root
Limitations
- It checks that the XML is well formed, not that it matches a schema.
- The text is re-serialised by the browser, so details such as the original quote style or XML declaration may change.
- Unescaped & characters in text make the XML invalid.
About this tool
Indent XML so it is readable and catch well-formedness errors.
XML Formatter is part of ToolStack Hub's Developer Tools. It runs entirely in your browser, which keeps your data private and makes results instant. There is nothing to install and no account to create. There is no usage limit.
Frequently asked questions
Is the XML Formatter free?
Yes. XML Formatter is completely free with no sign-up, limits or watermarks.
Is my data private when I use the XML Formatter?
Yes. It runs in your browser, so your input is not uploaded to our servers.
Does it work on mobile?
Yes. ToolStack Hub tools work on phones, tablets and desktop browsers.
Keep going
Need this automated for your business?
Vantalume builds custom AI and web automation workflows so your team can stop doing repetitive work.