{ }jsonkit
Tools/Convert/JSON ⇄ XML
Search tools…⌘K
Format
{ }JSON Formatter
≡→JSON Minifier
\"JSON Escape / Unescape
Validate
JSON Validator
±JSON Diff / Compare
§JSON Schema Generator
JWT Decoder
Convert
→csvJSON to CSV
csv→CSV to JSON
⇄ymlJSON ⇄ YAML
⇄xmlJSON ⇄ XML
→tsJSON to TypeScript
Query
$.JSONPath / JQ Tester
Generate
Mock JSON Data Generator
⇄xml

JSON ⇄ XML Converter

Attributes, arrays and namespaces handled.
processes as you type · client-side
Sample
Upload
⇄ JSON → XML
⧉ Copy output ⌘C
Download
Share
Clear
JSON219 B · paste or drop a file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
XML
1 2 3 4 5 6 7 8 9 10 11 12 13
<root> <id>usr_8x42</id> <name>Ada Lovelace</name> <email>ada@example.com</email> <active>true</active> <roles>admin</roles> <roles>editor</roles> <plan> <tier>pro</tier> <seats>5</seats> <renews>2026-08-01</renews> </plan> </root>
✓ valid (RFC 8259)219 B → 259 B0.0 msLn 1, Col 1UTF-8

About JSON ⇄ XML

The JSON to XML converter translates JSON into XML and XML back into JSON. Turn an API response into an XML document for a legacy system, or parse an XML feed into JSON your modern code can work with — both directions from one tool.

Everything runs in your browser with no upload, so documents that carry business data or credentials stay private. It is free, needs no account and has no artificial size cap.

It suits developers integrating with SOAP services, RSS/Atom feeds, or older enterprise systems that speak XML, while the rest of their stack speaks JSON.

How it works

JSON to XML

Object keys become XML element names and their values become the element contents, with nested objects producing nested elements. The result is a well-formed XML tree that mirrors your JSON structure.

Arrays and repeated elements

JSON arrays have no direct XML equivalent, so each array item is emitted as a repeated element with the same tag name — the standard way to represent a list in XML. Converting back collapses those repeated elements into an array.

Attributes and namespaces

The converter handles XML attributes and namespace prefixes when going from XML to JSON, representing them distinctly from element text so no information is silently merged or lost. Going the other way, it produces clean element-based XML.

Text, whitespace and escaping

Special characters such as <, > and & are escaped in the XML output so the document stays well-formed, and unescaped correctly on the way back, keeping the round trip faithful.

Frequently asked questions

How are JSON arrays represented in XML?

As repeated elements sharing one tag name, which is the conventional XML way to express a list. Converting back to JSON groups those repeated elements into an array.

Does it handle XML attributes and namespaces?

Yes. When converting XML to JSON, attributes and namespace-prefixed names are represented distinctly from element text so nothing is lost or conflated.

Why doesn't the XML round-trip back to identical JSON?

XML and JSON have different data models — XML lacks a native array or number type — so some structural choices are inherent. The converter keeps the data faithful, but a single JSON shape can map to more than one valid XML representation.

Is my document uploaded?

No. Both directions run locally in your browser, so sensitive XML or JSON documents stay on your machine.

Are special characters escaped correctly?

Yes. Characters like <, > and & are escaped in the XML output to keep it well-formed and unescaped on the way back.