@attr, text uses #text.How to use
Choose what you want to convert, paste your data, then convert.
- Select a mode (XML→JSON, JSON→XML, Format, Minify, Escape, Unescape).
- Paste your input into the left box.
- Set options (pretty output, indent, root name for JSON→XML if needed).
- Click Convert, then copy the result.
FAQ
Does this online XML converter upload my data?
No—conversion runs locally in your browser. Nothing is sent to a server.
How are XML attributes represented in JSON?
Attributes use an @ prefix (example: "@id"), and element text uses #text.
How does the converter handle repeated XML elements?
Repeated sibling tags with the same name become a JSON array (e.g., <a/><a/> → "a": [ ... ]).
Why does JSON→XML need a root element name sometimes?
XML must have exactly one root element. If your JSON doesn’t have a single top-level key, provide a root name (default is root).
Is the XML output guaranteed to match every XML schema?
No—this is a general-purpose converter for common structures. For schema-specific rules, validate against your XSD separately.
What’s the difference between Format XML and Minify XML?
Format adds indentation and line breaks for readability; Minify removes extra whitespace between tags to reduce size.
Can this tool validate XML?
It checks well-formed XML during parsing and shows a parse error if invalid, but it doesn’t validate against XSD/DTD.