JSONからXMLへのコンバータ
Convert JSON data to XML format. Paste your JSON on the left to get well-formatted XML output.
JSON Input
XML Output
JSON vs XML
JSON is lightweight and widely used in web APIs, while XML is more verbose but supports attributes, namespaces, and schemas. XML is still common in enterprise systems, SOAP APIs, configuration files (like Android layouts), and RSS/Atom feeds.
How are JSON arrays converted?
JSON arrays are converted to repeated XML elements wrapped in an <item> tag. For example, [1, 2, 3] becomes three <item> elements inside the parent.
How It Works
- Paste JSON: Enter any valid JSON object or array — from simple flat structures to deeply nested data.
- Configure options: Set the root element name, choose attribute vs element mapping for keys, and set indentation.
- Convert: Each JSON key becomes an XML element (or attribute), arrays become repeated child elements.
- Copy the XML: The well-formed XML is ready to use in systems that require XML format.
Why Convert JSON to XML?
While modern APIs predominantly use JSON, many enterprise systems, legacy platforms, SOAP web services, and data exchange formats (RSS, ATOM, XSLT pipelines, Android config files) require XML. Converting between the two formats is a common integration task. This converter handles type preservation (numbers stay numeric, booleans map to true/false), array flattening to repeated elements, and null handling. It produces well-formed XML that validates correctly, with a configurable root element name for compliance with specific XML schemas.
Conversion Rules
- Objects → XML elements with the key as tag name
- Arrays → repeated child elements with the same tag name
- Strings/numbers → text content of the element
- null → self-closing empty element
- Root element → configurable wrapper element name