XML to JSON Converter
Convert XML to JSON or JSON to XML. Errors show the exact line. More data tools
Convert between XML and JSON
XML is checked first, so a mismatched tag is reported with its line and column instead of silently producing wrong output. Attributes are kept with an @_ prefix, repeated tags become arrays, and numbers and booleans can be detected automatically.
JSON to XML writes an indented document with a declaration. If your JSON has several top-level keys, they are wrapped in the root tag you choose.
Features
- Live: the result updates while you type.
- Clear errors: the line, the reason and, where possible, a one-click fix.
- Open and drop files, copy or download the result, and share your input as a link.
- Send to another tool: pass the result straight to a related tool.
- Private: Everything runs in your browser. Your data is not uploaded to any server.
Related data tools
- JSON to YAML: Convert JSON to YAML or YAML to JSON. Use Swap to go the other way.
- JSON to TOML: Convert JSON to TOML or TOML to JSON.
- JSON to CSV: Turn a JSON array into a CSV table, or a CSV file into JSON.
- SQL to JSON: Paste INSERT statements and get JSON rows.
- All DataMint tools
Frequently asked questions
How are attributes shown in JSON?
With an @_ prefix, for example "@_id": "1". The same prefix turns a key back into an attribute when you convert JSON to XML.
What about repeated tags?
Tags that repeat become a JSON array.
Is my data private?
Everything runs in your browser. Your data is not uploaded to any server. You can even use the tool offline once the page has loaded.