XML formatter
Pretty-print, minify, and validate XML — entirely in your browser.
About the XML formatter
Handytool's XML formatter pretty-prints any XML document — config files, RSS feeds, SOAP envelopes, SVG markup — with consistent indentation. The Validate button uses the browser's built-in DOMParser to surface syntax errors with exact line and column. Minify collapses whitespace for compact transmission. Everything runs in your browser; XML never leaves your device.
XML formatter features
- 01
Pretty-print or minify
Format adds line breaks and indentation (2 or 4 spaces, or tabs). Minify strips inter-tag whitespace for compact size — useful when sending XML over the wire.
- 02
Native DOM validation
Validation goes through the browser's DOMParser, so error messages match exactly what an in-browser XML library would say. No extra dependencies, no server roundtrip.
- 03
Big files welcome
Pure-JS string formatting handles even multi-megabyte XML quickly. Browser memory is the only limit.
XML formatter FAQ
- Does it support XML namespaces?
- Yes. Namespaced elements like <ns:tag xmlns:ns="…">…</ns:tag> are preserved unchanged through formatting and minification.
- Will it validate against an XSD or DTD?
- No. Schema-based validation requires a different toolchain. This tool only checks well-formedness — that tags are balanced and attributes are quoted properly.
- Why does my CDATA block get reformatted?
- CDATA contents should be preserved verbatim. If you see whitespace creep into a CDATA block, paste a smaller subset — and report the case so we can tighten the formatter.
- Is the XML uploaded anywhere?
- No. Formatting, minification, and validation all run in your browser using native string operations and the DOMParser.
Related tools
Developer →- Live
SQL formatter
Pretty-print SQL queries — PostgreSQL, MySQL, SQLite, BigQuery and standard SQL — privately in your browser.
DeveloperFreeRuns locallyOpen - Live
YAML formatter
Format and validate YAML, or convert between YAML and JSON — privately in your browser.
DeveloperFreeRuns locallyOpen - Live
GraphQL formatter
Pretty-print and validate GraphQL queries, mutations, and schemas — privately in your browser.
DeveloperFreeRuns locallyOpen
Explore other tools
All tools →- Live
PDF to JPG
Convert each page of a PDF into a sharp JPG, PNG, or WebP image right in your browser — no upload, no quality loss.
PDFFreeRuns locallyOpen - Live
Remove background
Erase the background of a photo using an in-browser AI model — no upload, your images stay on your device.
ImageFreeRuns locallyOpen - Live
Trim Video
Cut the start or end of a video with frame-level precision.
VideoFreeOpen - Live
Trim audio
Cut a section of an audio file.
AudioFreeRuns locallyOpen - Live
Markdown to HTML
Convert Markdown into clean HTML right in your browser.
DocumentFreeRuns locallyOpen