Developer tool
XML Formatter & Validator
Beautify, minify, validate, inspect, and export XML while preserving namespaces, comments, CDATA, processing instructions, declarations, and document structure.
🔒 100% private browser processing
Your XML never leaves your device. Xepoca does not upload files, resolve external entities, fetch schemas, or store document contents.
XML input
Paste markup or load a supported text file.
Drop XML here
XML, SVG, XHTML, RSS, Atom, or TXT · maximum 5 MB
How XML formatting and validation work
The browser parses the document as XML rather than treating it as ordinary text. Well-formedness checks catch mismatched tags, malformed attributes, undeclared namespace prefixes, invalid entities, and other syntax errors before output is generated.
Formatting walks the parsed document tree and rebuilds consistent indentation while retaining element names, namespace prefixes, attributes, comments, CDATA sections, processing instructions, and the XML declaration. Mixed-content elements remain compact so inserted indentation does not change meaningful text spacing.
Validation here means XML well-formedness. The tool does not download external DTDs, resolve external entities, or validate business rules against XSD, Relax NG, or Schematron schemas.
Formatting options
Readable formatting
Choose indentation, wrap attributes, preserve comments and CDATA, and control empty-element syntax.
Safe minification
Remove formatting whitespace between element-only nodes while preserving significant text and xml:space regions.
Document inspection
Review the root element, namespace count, maximum depth, node statistics, duplicate IDs, and a navigable element outline.
Portable output
Copy the result or download a UTF-8 XML file without sending the source to a remote formatting service.