Skip to content
Toolcenter

XML to JSON Converter

Convert XML documents to structured JSON and back.

Loading tool…

Files and text are processed locally in your browser. Tools that must reach the network say so explicitly.

About the XML to JSON Converter

Convert XML to JSON and JSON back to XML. The Toolcenter converter parses XML with the browser’s DOM, preserves attributes under an @attributes key, collapses repeated elements into arrays, and can regenerate indented XML from JSON. Useful for API payloads, configs and feeds.

How to use it

  1. 1Choose XML → JSON or JSON → XML.
  2. 2Paste your document.
  3. 3Toggle attribute handling for XML input.
  4. 4Copy or download the converted output.

Key features

  • Two-way XML ↔ JSON conversion
  • Attributes preserved under @attributes
  • Repeated tags become arrays
  • Pretty-printed output
  • Parses locally with no upload

Frequently asked questions

How are XML attributes represented?+

Each element’s attributes are placed in an @attributes object, and its text content in a #text field when both are present.

What happens with repeated elements?+

Two or more sibling elements with the same tag become a JSON array automatically.

Can it convert JSON back to valid XML?+

Yes, with a single root key. The output is indented and escapes special characters.

Is my document uploaded?+

No. Parsing uses the browser’s built-in XML parser.

Also searched as

xml to json converter onlinefree xml to json converterxml to json converter freeonline xml to json converter freexml to json converter no sign upxml to json converter without watermarkxml to json converter no registrationbest free xml to json converterxml to json converter toolxml to json converter in browserxml to json converter offlinexml to json converter for pc

Related converters

See all converters