XML Formatter
This free online XML formatter turns messy markup into clean, readable code — and can minify or escape it in one click.
All tools on this site run entirely in your browser locally. No data is uploaded to any server.
Features:
- Beautify: Re-indent XML with consistent spacing and a clear tag hierarchy
- Minify: Strip whitespace and line breaks, compressing everything into a single line
- Escape / Unescape: Escape special characters, or restore escaped text back to its original form
- Keep comments: Preserve comments when formatting
- Code folding: Collapse and expand nodes to navigate large documents
- Local files: Open an XML file from your computer, or drag and drop it into the editor
Common uses:
- Cleaning up unformatted XML for easier reading and debugging
- Compressing XML to reduce transfer size
- Spotting broken tag nesting and other structural issues
- Escaping XML snippets for safe embedding in strings or configs