2 Free Online XML Tools
These 2 XML tools exist for the documents nobody chooses to work with but everyone eventually has to open: a SOAP envelope from a partner API, a Maven pom.xml that will not build, an RSS feed, an Android layout, a sitemap, a bank statement in ISO 20022. XML Viewer & Formatter parses the document with the browser’s own XML parser, tells you immediately whether it is well-formed and on which line it is not, and then shows it three ways — as a collapsible tree you can fold down to the branch you care about, pretty-printed with the indentation you choose, or minified onto one line. XML to JSON takes the same document and re-expresses it as JSON, mapping attributes and text nodes onto keys so the result is something a JavaScript or Python program can actually index into. Both run entirely in your browser, which matters because XML payloads are so often invoices, payment messages, and integration traffic that cannot be pasted into a stranger’s server.
All 2 XML tools
What you can do with these XML tools
Between them the two tools cover reading an XML document, reshaping it, and getting out of XML altogether.
- Check it is well-formed — a real XML parser, not a regex, so you get the exact line and column of the first error rather than "invalid XML".
- Read it as a tree — collapse the branches you do not care about, expand the one you do, with attributes shown inline on each element.
- Reindent it — two spaces, four spaces, or tabs, with optional attribute sorting and long start tags wrapped one attribute per line.
- Minify it — the same parse, serialised with no indentation, so the compressed output is still guaranteed well-formed.
- Keep meaning intact — whitespace-only text between elements is treated as layout, but mixed content, CDATA sections, comments, and processing instructions are preserved verbatim.
- Convert to JSON — attributes prefixed with @, element text under #text, repeated siblings collapsed into arrays, with optional type inference for numbers and booleans.
Which one do you want?
Reach for XML Viewer & Formatter when XML is the destination: you are debugging a request that a server rejected, reviewing a config file, or handing a colleague a document that has to stay XML. It is also the fastest way to answer "is this even valid?" — it re-parses as you type. Reach for XML to JSON when XML is only the source and everything downstream speaks JSON: a legacy endpoint you are wrapping, a feed you are importing, a fixture you want to assert against in a test. The conversion is not lossless in both directions, and that is worth knowing before you rely on it: XML distinguishes an attribute from a child element and JSON does not, so the mapping uses an @ prefix as a convention rather than a guarantee, and an element that appears once in one document and twice in another will come back as an object in the first case and an array in the second. Convert once and keep the JSON; do not treat the two formats as interchangeable representations of the same file.