How to Format and Check XML Online
Developer · Step-by-step guide · 3 steps · 2 min read
XML is a way to store data as text with tags. It is often one long line. This tool makes it neat and tells you where any mistake is.
Open the XML Formatter & Validator
In the pictures, orange letters like A show where to look. Each step tells you its letter.
Step 1: Paste or add your XML
In 1 Your XML, paste XML into Enter XML. Or upload a file. See A in the picture.
Step 2: Press Format / Beautify
In 2 Format, pick an Indent. Then press the button. Minify makes it small. Validate only checks it. Mistakes show the line number. See B in the picture.

Step 3: Use the result
The neat XML shows below. Press Download Output to save it. See C in the picture.

Tips and questions
What are common XML mistakes?
A tag that is never closed. Tags closed in the wrong order. Or a plain & that should be &.
Can I change XML to JSON?
Yes. Open More tools and press XML to JSON.
What is XPath?
It is a way to pick parts of an XML file, like //book/title. Type one into XPath query in More tools. Then press Evaluate.
Is there a tree view?
Yes. In More tools, Tree View lets you open and close each part.
Privacy
Your data is handled in your browser. It is never sent to us. So it is safe to paste private or work data.
Try it now
The XML Formatter & Validator is free. You do not need an account.
Open the XML Formatter & Validator