XML Formatter & Validator
Got an XML crammed into a single line, or need to find where the syntax error is? Paste the content, click Format and get the document indented and readable — with support for comments, CDATA and declarations. The validator points out the problem with a clear message, and minify compresses everything into one line for transport. Fullscreen mode available for large files.
Formatting that respects the structure
Indentation is done by understanding the document's real structure, not by search-and-replace tricks — so comments, CDATA blocks and processing instructions come out intact. Elements with simple text stay on one line; elements with children are opened and indented level by level.
Validation with the error pinpointed
If the XML is broken — an unclosed tag, an unquoted attribute, an invalid character — validation shows the error message with the problem line, so you can fix it without hunting in the dark.
How to use
Paste the XML into the text area (lines are numbered for easy reading). Click "Format" to indent, "Minify" to compress into one line or "Validate" to just check the syntax. Use "Copy" to take the result and the fullscreen button for large documents.
Frequently asked questions
Is my XML uploaded to any server?
No. All processing happens in your browser — the content never leaves your device, which also makes it safe for sensitive data.
Is there a size limit?
No fixed limit. Multi-megabyte documents work, with performance depending on your device.
Are comments and CDATA preserved?
Yes. Formatting understands the document structure and keeps comments, CDATA blocks and the top XML declaration.
Does it work with SVG, RSS and XHTML?
Yes. Any valid XML document can be formatted — including SVG, RSS/Atom feeds, sitemaps and configuration files.