Xepoca
← Back to Xepoca

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.

Related Xepoca tools

Frequently Asked Questions

Is the XML Formatter & Validator free?+
Yes. You can format, minify, validate, inspect, copy, and download XML without creating an account.
Is my XML uploaded anywhere?+
No. Parsing and formatting run locally in your browser. Files and pasted content are not uploaded to Xepoca.
Does it validate XML against an XSD or DTD?+
No. It checks whether XML is well formed. External schemas, DTD resources, XInclude files, and external entities are not fetched or applied.
Are namespaces, comments, and CDATA supported?+
Yes. Namespace prefixes and declarations are retained. Comments and CDATA are preserved by default and have independent settings.
Can formatting change text content?+
By default, text content is preserved. Mixed-content and xml:space='preserve' elements remain compact. The optional text-spacing control deliberately normalizes repeated whitespace in other text nodes.
Why is an external entity warning shown?+
External DTDs and entities can depend on network or filesystem resources. This tool does not resolve them, so documents that rely on those resources should be tested in the target XML processor.