Home / Tools / Data and formats
XML to JSON Converter
Convert XML to JSON and JSON back to XML.
Runs in your browserFree, no sign-upOpens .xml, .json
Loading tool…
How to use it
- Choose XML → JSON or JSON → XML.
- Paste your data or open a file.
- Copy or download the converted output.
About this tool
Attributes become keys that start with @ and element text becomes #text, so you can convert back without losing data. Repeated elements turn into arrays. Useful for supplier feeds, invoices, SOAP responses and old exports that only speak XML.
Your input is processed on your device. Nothing is sent to a server or stored.
Questions
How are attributes handled?
An attribute like sku="A1" becomes "@sku": "A1". When converting back, keys that start with @ become attributes again.
Does it support namespaces?
Namespaced tags keep their prefix, for example soap:Body, so nothing is dropped.
Data and formats
All data and formatsMore tools like this
Data and formatsJSON Formatter & ValidatorFormat, validate, minify, stringify and parse JSON.Opens filesOpen →Data and formatsCSV to JSON ConverterTurn CSV or TSV into JSON and JSON arrays into CSV.Opens filesOpen →Data and formatsYAML to JSON ConverterConvert YAML to JSON and JSON to YAML.Opens filesOpen →Data and formatsJSON to TypeScriptGenerate TypeScript interfaces from a JSON sample.Opens filesOpen →Data and formatsSQL FormatterFormat messy SQL into readable, indented queries.Opens filesOpen →Data and formatsHTML Beautifier & MinifierIndent minified HTML or minify it for production.Opens filesOpen →Data and formatsMarkdown Table GeneratorTurn CSV or spreadsheet cells into a Markdown table.Opens filesOpen →Data and formatsQuery String to JSONTurn URL parameters into JSON and JSON into a query string.Open →