Cette page n’est pas encore traduite en français : elle s’affiche en anglais.

JSON to XML Converter

Turn JSON into well-formed XML for SOAP services, legacy APIs, feeds and config files — with control over the root element, attributes and indentation.

Mis à jour le
Open file
Indent

Vos données ne quittent jamais votre ordinateur. Tout le traitement se fait localement dans votre navigateur.

Comment utiliser : JSON to XML

  1. Paste JSON or open a .json file.
  2. Set the root element name and how arrays and attributes are written.
  3. Copy or download the XML.

Mapping JSON to XML

JSON and XML model data differently, so a converter has to follow conventions. This tool uses the most common ones (also used by libraries such as xml2js and fast-xml-parser), which makes it the exact inverse of our XML to JSON converter:

JSONXML
{"name": "Ada"}<name>Ada</name>
{"tag": ["a", "b"]}<tag>a</tag><tag>b</tag>
{"@id": "7"}attribute id="7" on the parent element
{"#text": "hi"}text content next to attributes
nullempty element <x/> or xsi:nil="true"

The root element

XML documents need exactly one root. If your JSON is an object with a single key, that key becomes the root. Otherwise — or if you tick Always wrap in root — everything is wrapped in the root element you choose, and top-level arrays become repeated <item> elements.

Names and escaping

XML element names cannot start with a digit or contain spaces, so keys like 2fa enabled become _2fa_enabled. Text and attribute values are escaped (& → &amp;, < → &lt;), so the output is always well-formed. Format the result further with the XML formatter.

Aussi recherché comme : convert json to xml, json2xml, json xml converter, json to xml online, json array to xml.

Outils complémentaires : JSON to XML

  • Formateur JSON — Collez votre code JSON pour le formater, le compresser ou le valider.
  • JSON to YAML — Paste JSON and get clean YAML for Kubernetes manifests, Docker Compose, GitHub Actions or any config file.
  • JSON Viewer — Explore big or deeply nested JSON comfortably: fold and unfold objects, search for keys or values and click any node to get its JSONPath.
  • JSON Schema Validator — Paste a schema and some JSON to see exactly which values break which rule — or generate a starting schema from example data.

Questions fréquentes

How are JSON arrays converted to XML?
Each array item becomes a repeated element with the array’s key as its name, for example {"tag": ["a","b"]} → two <tag> elements.
How do I create XML attributes?
Prefix the key with @ (configurable): {"product": {"@id": "7", "name": "Keyboard"}} → <product id="7">.
Is my data uploaded?
No. Conversion runs in your browser.
Puis-je installer JSON to XML en tant qu’application web et l’utiliser hors ligne ?
Oui. JSON to XML est une application web installable (PWA) : elle s’installe depuis votre navigateur, sans passer par une boutique d’applications. Cliquez sur « Installer l’application » en haut de cette page dans Chrome ou Edge (Windows, macOS, Linux, ChromeOS) ; sur Android, utilisez « Partager » → « Ajouter à l’écran d’accueil » sur iPhone et iPad ; ou « Fichier » → « Ajouter au Dock » dans Safari 17+ sur Mac. L’application s’ouvre alors dans sa propre fenêtre avec sa propre icône, et comme elle s’exécute entièrement dans votre navigateur, elle continue de fonctionner hors ligne. Firefox sur ordinateur de bureau ne permet pas d’installer d’applications web. Comment fonctionne l’installation.

Outils similaires