Skip to content
Rotina Diária

Format and validate XML

Indent, minify, and validate XML with the exact line number for each error—great for invoices, SOAP, RSS, and SVG.

Processed on your device. Nothing you type is sent anywhere.

How to use: Format and validate XML

  1. Paste your XML or open a file (also supports .svg, .rss, .xsd, and .config).
  2. Click Format to indent, Minify to remove whitespace, or Validate only.
  3. If there’s an error, the problem line is highlighted in the editor, and the message explains what to fix.

About this tool

Validation checks whether the XML is well-formed: every opening tag must be closed in the correct order, attribute values must be quoted, duplicate attributes aren’t allowed, a standalone & must be written as &, and there must be only one root element. The browser’s own XML parser then performs a second, full check.

When formatting, elements that contain only text stay on one line (<customer>Ana</customer>), and comments, CDATA sections, and the <?xml?> declaration are preserved. Minifying removes only whitespace between tags—the text inside elements isn’t changed.

It’s safe to validate an invoice XML file or a SOAP response here: everything runs in your browser, and nothing you paste or type is sent to a server.

Frequently asked questions

Does the tool validate against an XSD schema?

No. It checks whether the XML is well-formed—that is, whether its syntax is correct. Validating against an XSD schema, which checks required fields and data types, requires the schema file for the target system.

Why does the error point to a different line than I expected?

If a closing tag is missing, the issue may not be detected until a mismatched closing tag appears. The message tells you which line the unclosed tag was opened on to make it easier to find.

Does formatting change the XML content?

Only the whitespace between tags. Attributes are separated by a single space, and the text inside each element is preserved.

Is it really free? Is there a daily limit?

It's free with no daily limits. Processing happens on your device, so there's no per-use cost and no need to limit you.

Does it work on phones?

Yes. The site works in any modern browser on Android, iPhone, Windows, Mac, and Linux—no installation needed.