XML to JSON Converter

Convert XML to JSON format for modern APIs and data processing

Paste valid XML. Maximum 50,000 characters.

Use Cases

Data Conversion

Convert XML to JSON for modern APIs and applications

Data Structure

XML elements become JSON properties with proper hierarchy

Formatted Output

Outputs properly indented and minified JSON

Attribute Handling

XML attributes are preserved in the JSON output

How to Use

  1. Paste your XML data into the input field
  2. Click the Convert button to transform the XML
  3. Review the formatted JSON output
  4. Copy the JSON or download it as a file

How It Works

  • XML Elements: Become JSON object properties with their values
  • XML Attributes: Preserved and included in the JSON output
  • Text Content: Stored as text or value properties depending on structure
  • Nested Elements: Create nested JSON objects maintaining hierarchy
  • Multiple Elements: With same name become JSON arrays
  • Pretty Print: Formatted output for easy readability