JSON ⇄ XML Converter
Convert JSON to XML and XML back to JSON. Custom root element, attributes via @keys, pretty output. Import files, copy or download.
Use @key in JSON for XML attributes (e.g. "@id": "1"). Repeated tags become JSON arrays. Namespaces and CDATA are preserved as plain text only.
How it works
Paste or import
Paste JSON or XML text, or import a .json or .xml file up to 5 MB. When converting to XML, invalid JSON is flagged live.
Choose direction and options
JSON → XML lets you set the root tag and pretty-print XML. Use @property names for attributes. XML → JSON can unwrap the document root and pretty-print JSON output.
Convert and export
Click Convert (counts toward the daily limit). Copy the result or download converted.xml or converted.json. Swap moves output to input and flips direction.
Why JSON and XML?
JSON dominates modern APIs; XML still powers RSS, SOAP, legacy enterprise feeds, and config files. Converting between them lets you bridge old and new systems without server-side scripts.
Why use this tool
- JSON to XML and XML to JSON
- Custom root element name
- Attributes via @key in JSON
- Import .json or .xml files
- Live JSON syntax check (JSON → XML mode)
- Unlimited — no daily cap
Questions
What does JSON ⇄ XML do?
It converts JSON documents to XML and parses XML back into JSON using the browser DOMParser.
How do I represent XML attributes in JSON?
Prefix the key with @ — for example "@id": "1" becomes id="1" on the element. Text-only content may appear as #text when attributes are present.
Can I choose the XML root element?
Yes. Set Root tag before converting JSON to XML. The entire JSON object becomes children of that root element.
What about namespaces and CDATA?
Standard conversion handles common element trees. Advanced namespace prefixes and CDATA sections are not specially modeled — use a dedicated XML library for complex documents.
Is my data sent to a server?
No. Conversion runs entirely in this tab.
Is there a daily limit?
No. This tool has no daily cap.
If Easy24 helped, buy a coffee
Tools stay free in your browser. One-time thanks via Kreosus. Turkish cards work.
Similar Developer tools
See allJSON Formatter
Developer
Pretty-print, minify, validate, and sort JSON keys in the browser. Choose 2- or 4-space indent, import a file, download the result.
OpenMeta Tag Generator
Developer
Build SEO title, description, Open Graph, Twitter Card, and canonical tags with a live social preview. Runs in the browser.
OpenCSS Gradient Generator
Developer
Design linear and radial CSS gradients with up to three color stops. Live preview, presets, hex input, copy or download.
Open