JSON XML Converter
Convert JSON to XML and XML back to JSON in the browser.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Converted 37 characters from json to xml.
How it works
- Parsed the input with the pure in-browser engine.
- Applied the documented XML mapping rules.
- Collected an explicit warning for every lossy transformation.
- The conversion produced 1 warning(s); warnings are shown before the result.
Methodology
- Parse JSON with the F054 verbatim scanner, or XML with the F056 parser.
- Map object members to child elements, @-keys to attributes and #text to text content.
- Repeat the element name for arrays and report every lossy step.
Usage
- Choose JSON to XML or XML to JSON.
- Paste the document.
- Run the tool; read any warnings before copying the result.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
JSON to XML
{
"text": "{\"book\":{\"title\":\"JSON\",\"year\":2020}}",
"direction": "json-to-xml"
}XML to JSON
{
"text": "<book id=\"1\"><title>JSON</title></book>",
"direction": "xml-to-json"
}Limitations
XML mapping
A JSON object is emitted as an element whose members are child elements. Keys beginning with @ become attributes and a #text key becomes the element's text content.
Frequently asked questions
- How are attributes represented?
- An XML attribute becomes a member named @name; text content becomes #text, and JSON keys map to child element names.
- Why is my XML number a string?
- XML element content is text; the XML→JSON direction cannot know which strings were numbers.
- Is my data uploaded?
- No. The conversion runs entirely in your browser and is never sent anywhere.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.