JSON to typed XML
Convert JSON to XML with type attributes for objects, arrays and scalar values.
- 1Add input
- 2Review and run
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Convert JSON into XML with a type attribute on every value. Common JSON keys become element names; arrays use item elements. Inspect the mapping before using it with an XML consumer.
How to use this tool
- Paste JSON or select a UTF-8 JSON file.
- Check the source validation and whether any keys need the property-name fallback.
- Create the XML, inspect the type attributes, then copy or download the complete file.
Supported inputs and limits
This is a type-attribute mapping, not an arbitrary XML schema or an exact WCF serializer. Keys that are not simple XML names use <property name="…">.
JSON strings containing characters prohibited by XML 1.0 cannot be converted. Duplicate JSON keys are rejected.
Files and input are processed in this browser. No account needed.
Worked example
Example input
{"id":7}Example options
{}Example output
<?xml version="1.0" encoding="UTF-8"?> <root type="object"><id type="number">7</id></root>
When something does not work
Fix invalid or duplicate JSON keys and remove XML 1.0 prohibited characters. If your importer expects a different schema, use its required mapping.
Frequently asked questions
What does the generated XML look like?
The root is <root type="…">. Object keys become child element names, array entries become <item>, and each value has a JSON type attribute.
Will my XML importer accept this output?
Only if it supports this mapping. This is not an arbitrary XML schema or an exact WCF serializer. Keys that are not simple XML names use <property name="…">. Test the importer with a sample first.
Is my input sent to a server?
No. Tool input is processed in your browser, not sent to a server. Temporary workspaces stay in the same tab and are cleared by a refresh or tab closure. Save the results you need.
Documentation & further reading
Related tools
JSON formatting workspace
Format or minify strict JSON, sort object keys, and encode or decode strings while preserving raw number tokens.
Regex tester
Try a pattern and see what it matches in your text.
Compare text
See what changed, side by side.
HTML formatter
Format HTML indentation so its structure is easier to read.