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.
Guides
Articles →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
Watermark PDF
Add a text watermark to every page of a PDF in your browser. Set the text, size, opacity, color, and angle, then download the watermarked file.
PDFFreeRuns locallyOpen - Live
Blur Image
Blur or pixelate faces, license plates, and private details in a photo — free, in your browser.
ImageFreeRuns locallyOpen - Live
WebM to MKV
Convert WebM videos to MKV (Matroska) in your browser — files never leave your device.
VideoFreeRuns locallyOpen - Live
Audio Joiner
Merge multiple audio files into one, with optional crossfade.
AudioFreeRuns locallyOpen - Live
JSON viewer
View, format and validate JSON in your browser.
DocumentFreeRuns locallyOpen