Does 2xml validate against a schema?
No. It checks well-formedness and namespaces, not XSD or DTD rules.
Errors by line and column.
Paste XML to format it and check it is well-formed, with every problem listed by line and column. Paste JSON instead and it is converted to XML automatically.
Loading the toolbox.
You do not have to take our word that your data stays here. Developer tools show every request a page makes, so you can watch this page work and confirm that nothing is sent. The check takes under a minute.
F12, or Cmd+Option+I on a Mac, and select the Network tab.Only two things can add a line to that log, and neither carries your data. Submitting the feedback form sends the vote and comment you typed. Typing characters in a script the page has not displayed yet, such as Cyrillic or Greek, can make the browser fetch the matching font file, and that request names only the font.
The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site and the anonymous analytics endpoint, so a coding mistake could not quietly send your data elsewhere.
Well-formed XML has exactly one root element, every start tag closed by a matching end tag in the right order, every attribute value in quotes, no unescaped < or & in text, and properly declared namespace prefixes. A parser must stop at the first violation, which is why a single stray character can make a feed or SOAP response unreadable.
2xml uses your browser's own XML parser as the final authority, and runs its own scanner alongside it so that it can report several problems at once, each with a line and column.
Many formatters rebuild XML from a parsed tree, which reorders attributes and can drop comments. 2xml pretty-prints from the original source, so attribute order, comments, CDATA sections, processing instructions, and the XML declaration are kept exactly. Elements that hold only text stay on one line.
There is no single standard mapping, so 2xml uses a common convention: attributes go under an @attributes key, text mixed with child elements goes under #text, and repeated child elements become an array. Converting JSON to XML reverses the convention, escapes the five XML special characters, and replaces any key that is not a legal element name with item, so the output is always well-formed.
Elsewhere in the toolbox: 2uuid, 2gitignore, 2csp, 2htaccess, and more on the 2toolbox home page. Part of the 2suite.io privacy-first ecosystem.
No. It checks well-formedness and namespaces, not XSD or DTD rules.
Repeated elements are legal XML and normal in feeds and lists. The warning helps catch accidental copies.
No. Parsing uses the browser's DOMParser on this page. Nothing is sent anywhere.
Documents of a few megabytes format quickly. Very large files depend on your device's memory.