● online

XML Formatter

Turn a wall of XML into neatly indented, readable markup — and find out instantly whether it is well-formed, with the exact error if it is not.

Advertisement

How to use the XML Formatter

  1. Paste your XML.
  2. Choose the indent size.
  3. Press Format & validate, or Minify to strip whitespace, then copy the result.

About the XML Formatter

XML still powers sitemaps, RSS and Atom feeds, Android resources, Office documents, SOAP APIs and countless configuration files. A single unclosed tag or stray ampersand makes the whole document unreadable to software, so validation is the first step in debugging. This tool parses your XML with the browser’s own standards-compliant parser, reports the line and reason for any error, then re-indents the document so its structure is easy to follow. Short elements that contain only text stay on one line to keep the output compact.

Advertisement

Frequently asked questions

What does “not well-formed” mean?

The XML breaks a basic rule — an unclosed tag, mismatched names, an unescaped & or < in text, or more than one root element. The message shows where.

Does it validate against a schema (XSD)?

It checks that the XML is well-formed. Schema validation needs the XSD file and is not included.

Can I minify XML?

Yes — press Minify to remove whitespace between tags while keeping text content.

Is it safe for private data?

Yes. Parsing and formatting happen in your browser.

Related free tools

← Back to all 150 free online tools

Runs in your browser — what you enter stays on your device. Published .

The Tools Guru Editorial Team

Three front-end engineers and technical writers in Punjab, Pakistan, shipping browser software since 2011. Every formula on this site is implemented from a primary source and checked against an independent reference implementation before release — see our editorial policy. Spotted a wrong number? Tell us and we will reproduce it, usually the same working day.

Advertisement

Explore all 150 free tools

Results filter as you type. Press Control plus K to jump here. Ctrl K
150tools0uploads to servers100%free forever

Trending now

All tools