Skip to content

Data Conversion Suite · free · no sign-up

XML to JSON

Convert XML into JSON for use in JavaScript and APIs.

How it works Report a problem

XML to JSON Converter

Transform XML documents into structured JSON with attribute & element handling

⚑ Nested Support πŸ”– Attributes πŸ“‹ Pretty Print
XML Input

About the XML to JSON

Convert XML into JSON for use in JavaScript and APIs.

How to use the XML to JSON

  1. Paste your XML or click Sample.
  2. Choose the Indentation and the Attribute Handling (prefix with @, nest in _attr, or ignore), and optionally Force Arrays.
  3. Press Convert to JSON and copy the result.

Tips

  • Force Arrays keeps the structure consistent when an element may appear once or many times.

Frequently asked questions

What happens to XML attributes?
You choose: prefix them with @, nest them in an object, or drop them.