Structured Data
XML to JSON Converter
Paste XML and get clean, predictable JSON — attributes, repeated elements, and numbers are handled for you. Copy or download the result. Everything runs in your browser, so your data never leaves the page.
XML input
never uploadedParsed in this page. Malformed XML is reported with a line and column instead of a broken state.
JSON output
readyHow the conversion works
Each element becomes an object. Attributes are added as @name fields, child
elements become keys, and repeated sibling tags become arrays. An element with only text
becomes that text value; an element that also has attributes or children keeps its text under
#text. Attribute values stay strings so identifiers like id="007" are
not mangled, while text values can be converted to numbers and booleans. Comments and
processing instructions are ignored, and CDATA is treated as text. The optional share link
keeps your XML and options in the URL fragment, which never leaves your browser.