XML to JSON Converter

Convert XML to JSON and JSON to XML with one switch — free, private, in your browser.

✓ 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

  1. Paste XML or JSON – Choose the direction and paste your input.
  2. Convert – Click Convert to translate the data.
  3. 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.

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.

Browse all text & data tools