Convert XML data to JSON format instantly.
Copy and paste your XML data into the input field.
Click Convert to transform XML to JSON format.
Click Copy to save the JSON to your clipboard.
An XML to JSON converter transforms XML documents into JSON that modern code works with easily. XML is common in legacy systems, SOAP APIs, RSS feeds, and configuration, while JSON is the native format of JavaScript and most current APIs. The converter bridges old and new.
Paste XML and get structured JSON out instantly, with elements, attributes, and nesting mapped sensibly. It runs in your browser, so documents containing business data are never uploaded.
A lot of valuable data still arrives as XML: RSS and Atom feeds, SOAP web services, sitemaps, office document formats, and older enterprise APIs. Modern front ends and services speak JSON. Converting lets you pull XML data into a JavaScript app, a JSON database, or a tool that only understands JSON, without writing a custom parser each time.
XML has two ways to hold data that JSON does not distinguish: child elements and attributes. Converters represent attributes with a prefix or a dedicated key so nothing is lost, and repeated child elements become a JSON array. A tag with both attributes and text content maps to an object holding both, which keeps the conversion reversible in spirit.
XML and JSON are not perfectly isomorphic. XML distinguishes attributes from elements, allows mixed content (text and tags interleaved), and cares about element order in ways JSON does not. For typical data-carrying XML the mapping is clean, but documents that mix text and markup, like XHTML, convert less tidily. Knowing this helps you spot when output needs a second look.
JSON to XML
Convert JSON data to XML format instantly.
JSON to YAML
Convert JSON data to YAML format instantly.
YAML to JSON
Convert YAML data to JSON format instantly.
CSV to XML
Convert CSV data to XML format instantly.
HTML to JSON
Convert HTML tables and data to JSON format.
HTML to XML
Convert HTML to well-formed XML.