katlab tools/xml support on Ko-fi

XML · Formatter / Validator

Pretty-print, minify and check XML for well-formedness — and convert XML ↔ JSON — all in your browser.

Everything is processed locally. Nothing is uploaded to a server.
Indent
XML input
Result

    

How to format, validate or convert XML (free)

  1. Pick a mode: Format to pretty-print, Minify to strip whitespace, or convert to and from JSON.
  2. Paste or type your XML (or JSON, for the JSON → XML mode).
  3. Read the result and any well-formedness error, then copy. Nothing is uploaded at any point.

What is well-formed XML?

An XML document is well-formed when it follows XML's basic syntax rules: every opening tag has a matching closing tag, tags are nested correctly (no overlap), attribute values are quoted, special characters like & and < are escaped, and the whole document has exactly one root element. This tool validates well-formedness using your browser's native XML parser and reports the first error with a line number where available.

Well-formed is not the same as valid

Be honest with yourself about what this checks: well-formedness, not schema validity. A document can be perfectly well-formed and still not match an XSD or DTD schema — wrong element names, missing required children, wrong data types. This tool does not load or check schemas; it only confirms the syntax is sound. For schema validation you need a validating parser with your XSD/DTD.

XML vs JSON conversion

XML and JSON model data differently, so conversion is a best-effort mapping rather than a lossless one. Element attributes have no direct JSON equivalent, so they are prefixed with @_ (for example id="1" becomes "@_id": "1") to keep them separate from child elements; text content sits under #text. Repeated sibling elements become a JSON array. Order of mixed content, comments and namespaces may not survive a full round trip, so review the output when structure matters. Use the include attributes toggle to drop attributes entirely when you only care about element data.

Is my data private?

Yes. Formatting, minifying, validating and converting all run entirely in your browser tab — the XML engine is vendored and loaded from this site, with no network calls. Nothing you paste leaves your device. Open the network tab to verify: the tool keeps working with the connection turned off once the page has loaded.