XML formatter
Indented to be read, or squeezed to one line to be sent.
Output
Paste or type above to see the result here.
Your files stay on your device
This tool runs entirely in your browser. What you paste is processed on your device and is never sent to a server, so it is safe to use with tokens, keys and unpublished text.
How it works
- Paste the XML.
- Choose indenting or minifying.
- Copy the result.
Frequently asked questions
- Does it validate the XML?
- No, and that is deliberate: the XML people want to read is often the XML that does not quite parse. Tags and text are laid out as they are found, so a fragment or a file with a stray character still comes back readable.
- What happens to CDATA and comments?
- They are carried through exactly as typed, and a CDATA section is never re-indented inside.
- Why does <name>Jane</name> stay on one line?
- An element holding nothing but text reads better whole. Elements holding other elements are indented by depth.
- Is the XML sent anywhere?
- No. It is formatted in your browser.
Related tools
{} JSON Formatter Paste JSON, get it indented, minified or validated instantly. Your data stays on this page. ⌗ SQL formatter A query you can read, from one you were handed. ⇄ Converters Markdown to HTML Write in Markdown, paste the HTML anywhere. Rendered locally, so your draft stays on your device. ≠ Text tools Text Diff Paste two versions of a text and see exactly which lines changed.