Skip to content
OneTooling

XML Formatter

Format, beautify, minify, and validate XML with line and column for errors. Works on SVG, RSS, and sitemaps. Runs in your browser, nothing is uploaded.

Runs in your browser · nothing uploaded
Output
Indent

Paste XML to check it.

Why is there an ad? This tool is free and runs on your device. One small ad pays for hosting and new tools. No pop-ups, no autoplay, never inside the tool. How we make money

How to format or validate XML

  1. Paste your XML, or open an .xml file.
  2. Choose Format to beautify it with 2 spaces, 4 spaces, or tabs, or Minify to shrink it.
  3. Fix any error shown with its line and column, then copy or download the result.

The status line under the editors tells you whether the XML is well-formed. Long text values stay on one line so the structure is easy to scan.

Questions

Is my XML uploaded?

No. The XML is checked and formatted in your browser, so configuration files, feeds, and documents stay on your device.

How does validation work?

The page checks that your XML is well-formed: tags are closed in the right order, attributes are quoted, and there is one root element. If something is wrong, you get the line and column of the first problem. It does not check against an XSD or DTD schema.

Does formatting change my data?

No. Only whitespace between tags changes. Attributes, entities such as &, comments, and CDATA sections are kept exactly as written.

What does minify do?

It removes the line breaks and indentation between tags, and optionally comments, to make the file smaller. Text inside elements is left untouched.

Can it format SVG, RSS, or other XML files?

Yes. Any XML-based format works, including SVG, RSS, Atom, sitemaps, KML, GPX, and plist files.

Credits

Built on fast-xml-parser (MIT). OneTooling is not affiliated with that project.