XML formatter
Pretty-print nested XML and HTML-like markup, or minify it to a single line. Attributes, comments, CDATA, and the declaration stay intact - all in your browser.
Pretty-print nested XML and HTML-like markup, or minify it to a single line. Attributes, comments, CDATA, and the declaration stay intact - all in your browser.
Paste your markup, pick pretty-print or minify, and copy the result. No upload, no signup, no waiting on a server.
Drop in any XML or HTML-like markup - a config file, an RSS feed, a SOAP envelope, an SVG. The formatter reads tags, attributes, comments, and CDATA as you type.
Pick pretty-print to expand nested elements with 2-space, 4-space, or tab indentation, or pick minify to collapse everything onto one compact line.
Grab the cleaned-up markup with one click, or download it as a .xml file. Same input always gives the same output - it is fully deterministic.
A formatter that respects the parts of your document that must not change, and runs entirely on your machine.
The XML declaration, comments, and <![CDATA[...]]> sections are copied through byte-for-byte. The formatter never rewrites the contents your parser depends on.
Expand deeply nested elements for code review, or strip every newline and gap between tags to ship the smallest possible payload. One toggle switches between them.
Two spaces, four spaces, or a real tab character. Match whatever your editor, linter, or team style guide expects without hand-editing.
Everything runs in JavaScript in your browser. Your markup is never uploaded, logged, or sent to a server - paste sensitive config or API payloads with confidence.