XML to JSON Converter

Convert XML to JSON instantly in your browser. Paste your XML and get a clean JSON object — handles attributes, nested elements, and repeated tags.

XML Input
JSON Output

How to use

  1. Paste your XML into the input panel on the left.
  2. The JSON output appears on the right instantly as you type.
  3. Click Copy to copy the JSON to your clipboard.

Frequently asked questions

How are XML attributes converted to JSON?

Attributes become keys prefixed with "@". For example, becomes { "item": { "@id": "1" } }.

How are repeated XML elements handled?

Repeated sibling elements with the same name are combined into a JSON array automatically.

Does this handle XML namespaces?

Namespace prefixes are preserved as part of the key name (e.g., "ns:element"). Full namespace resolution is not performed.

Does this converter send data to a server?

No. Conversion uses the browser's built-in DOMParser. No data leaves your device.

Last updated

Powered by maratool