Home / XML to JSON

XML to JSON

Paste XML, get JSON. Paste JSON, get XML back.

XML and JSON are both common data-interchange formats, but working across systems that use different ones means converting between them — this handles it instantly in your browser.

How it works

  1. Paste your dataXML with nested elements and attributes, or JSON.
  2. Pick a directionXML → JSON or JSON → XML, both work.
  3. Copy the resultAttributes are preserved as an @attributes object.

Good to know

  • XML attributes convert to an @attributes object rather than being dropped
  • Repeated sibling elements become a JSON array automatically
  • Text content of an element with no attributes becomes a plain string, not a nested object
  • Works both directions on the same page — no separate tool needed

FAQ