Border Radius Generator
Shape corners individually, including the elliptical slash syntax.
Pretty-print XML with clean indentation, or collapse it back to one line.
The XML Formatter re-indents a document so its structure is visible: one element per line, children under their parent, text-only elements left on a single line, and CDATA, comments and the declaration preserved exactly.
Machine-written XML arrives as one enormous line. The formatter re-indents it so the structure is visible: one element per line, children indented under their parent, and attributes left on the opening tag where they belong.
A few decisions make the output genuinely readable rather than merely indented. An element holding nothing but text stays on one line, because splitting it would change the content of a whitespace-significant document. Empty elements collapse to the self-closing form. CDATA sections, comments and processing instructions are preserved exactly, and the XML declaration is kept at the top. If the document does not parse you get the line number and what was expected instead.
A tag wrapping nothing but text is not split, because breaking it would change the content of a whitespace-significant document.
CDATA sections, comments and processing instructions are copied through untouched, and the declaration stays on the first line.
An element with no content is written in the self-closing form, which is shorter and unambiguous.
A document that will not parse reports the line and names the mismatched, unclosed or stray tag.
Prefixed names such as soap:Envelope and xmlns attributes pass through formatting unchanged.
A config file, an API response, an RSS feed or a SOAP envelope.
Two spaces, four spaces or a tab, to match the rest of your project.
An unparseable document reports the line and the mismatched or unclosed tag.
Take the formatted document to your clipboard or save it as .xml.
Only whitespace between elements. Text inside an element is preserved, attributes keep their values, and CDATA is copied through untouched.
Almost always a mismatched or unclosed tag, or more than one root element. XML is far stricter than HTML: every tag must close, and nesting must be exact.
Yes by default, and there is an option to strip them when you want the smallest readable document.
Yes. Prefixed element names such as soap:Envelope and xmlns attributes are treated as ordinary names and attributes, so they survive formatting unchanged.
What people who use the XML Formatter think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the XML Formatter. It takes half a minute and no account.
Write the first reviewShape corners individually, including the elliptical slash syntax.
Parse Set-Cookie and Cookie headers, and check the security flags.
Every regex token, searchable, with an example of what it matches.
Convert a hexadecimal string to Base64, standard or URL-safe.
Turn any text into a JSON string literal, or unwrap one back to plain text.
Convert a duration between seconds, ISO 8601, clock time and words.
Check JSON syntax and get the exact line, column and cause of any error.
Tidy a TOML file: consistent quoting, ordered tables, keys before headers.