XML Formatter

Pretty-print XML, minify it into a single line, and even check for well-formedness

도구를 불러오는 중…

🔒 Everything runs 100% in your browser. Your files and input are never uploaded to any server.

This tool formats XML documents into a nicely indented form, or removes whitespace to compress them into a single line. It instantly checks well-formedness (structural integrity) with the browser parser so you can confirm that tags are properly closed.

How to use

  1. Paste the XML to format or drag and drop a file.
  2. Choose the 'Format' or 'Minify' tab, and for formatting, pick the indentation unit.
  3. The result updates instantly, shown alongside its well-formedness and size.
  4. Put the result on your clipboard with the Copy button.

FAQ

Are attributes, CDATA, and comments preserved?
Yes. It preserves tag attributes, comments (<!-- -->), CDATA, and processing instructions (<?xml?>), tidying only the unnecessary line breaks inside tags.
What gets removed when minifying?
Meaningless whitespace and line breaks between tags are removed. Leading and trailing whitespace in text nodes is also cleaned up, so be careful with documents where whitespace is significant.
If it's well-formed, is the schema valid too?
No. This check only looks at syntactic integrity like tag pairing and nesting. It doesn't perform DTD/XSD schema validation, so use it for reference only.

← Back to all tools

가격 보기카톡 무료 상담