XML to JSON Converter
Convert XML to JSON and JSON to XML with one switch — free, private, in your browser — 100% private — your files never leave your device.
✓ Your files never leave your device. Everything runs locally in your browser.
XML still powers many enterprise and SOAP systems, while modern apps and REST APIs speak JSON. This converter translates between the two in your browser.
Attributes are represented with an @_ prefix and text content as #text, so no information is lost in the round trip.
How it works
- Paste XML or JSON – Choose the direction and paste your input.
- Convert – Click Convert to translate the data.
- Copy or download – Copy the result or download it.
How attributes are mapped
XML attributes become JSON keys prefixed with @_, and element text becomes #text. This convention is reversible, so JSON to XML produces equivalent XML.
Good to know
XML can encode some things JSON cannot represent exactly (mixed content, DTDs). For typical data documents the conversion is clean.
When XML to JSON conversion helps
XML is common in legacy systems, feeds (RSS/Atom), SVG documents and SOAP APIs, while modern web and mobile code prefers JSON. Converting once lets you feed the same data into a JavaScript app, a Python listener or a database import without writing an XML parser.
- Turning a SOAP or REST XML response into JSON for a frontend.
- Reading an RSS/Atom feed as structured data.
- Preparing config or fixture files for tooling that only accepts JSON.
Because the conversion runs locally, you can paste confidential data without an upload request reaching a server.
Frequently asked questions
Is my data uploaded?
No. Conversion happens locally in your browser.
What happens to XML attributes?
They become keys prefixed with @_ (for example @_id), and text content becomes #text.
Can it handle namespaces?
Namespace prefixes are kept as part of the element names.
Related tools
Convert XML or JSON now — free, private and without uploading your data.