Paste or load XML, then check well-formedness with the browser’s DOMParser, pretty-print with configurable indentation, or
minify via XMLSerializer. Ideal for AndroidManifest snippets, RSS, SVG, and API payloads — everything stays on your device.
No file loaded
Output appears here after Format, Minify, or Validate.
XML (eXtensible Markup Language) is a tree-structured text format: one root element, nested child elements, attributes in quotes, character data and CDATA sections, plus comments and processing instructions. It powers Android resources and manifests, RSS/Atom, SVG, many SOAP and enterprise APIs, and countless config formats. Unlike JSON, XML carries namespaces, mixed content, and schema languages (XSD, Relax NG) — but this page only checks well-formed syntax, not schema validity.
DroidXP’s XML Formatter uses the browser’s DOMParser with the text/xml MIME type. If parsing fails, Chromium and WebKit expose a
<parsererror> node with a human-readable message. On success, we walk the DOM to emit indented markup (elements, text, CDATA, and
comments where preserved), or minify by serializing the root element with XMLSerializer. The original XML declaration is not round-tripped by
the DOM; you can optionally prepend a standard declaration on formatted output.
.xml / text file onto the zone.
Well-formed means tags balance, attributes are quoted, and there is a single root — what DOMParser enforces. Schema validation (XSD, Schematron,
Android lint rules) requires extra tooling. Use this formatter for quick syntax checks and readable diffs; use your build or IDE for contract validation.
No. The document is parsed and formatted entirely in your browser tab. For confidential manifests or API keys embedded in files, follow your team’s policy before pasting into any website.
Common issues include unescaped < or & in text, mismatched end tags, duplicate attributes, invalid control characters, or multiple root elements.
The browser’s error summary points to the problem class; fix the markup and try again.
The parser keeps comments and CDATA nodes in the DOM; the pretty-printer writes them back in a normalized layout. Whitespace-only text nodes between tags are usually omitted from output for cleaner indentation.
After parsing, the DOM does not expose the original prolog as a node. Use the Prepend XML declaration option when you need
<?xml version="1.0" encoding="UTF-8"?> on formatted output, or paste your own prolog back in your editor.
Very large files can stress tab memory and the main thread. For multi‑megabyte logs or data dumps, prefer command-line tools (xmllint, xmlstarlet) or IDE features.
No. It only checks XML syntax. Element names, attributes, and values must still comply with Android packaging rules — use the Android Gradle Plugin, Lint, or DroidXP’s dedicated manifest validator for structural Android checks.
The DOM stores namespace URIs and prefixes; serialization may reorder attributes or normalize prefixes compared to hand-written files. Always review diffs before committing.