XML to JSON

Convert XML data to JSON format with customizable formatting options

XML Input
0 chars
JSON Output
0 chars
Output Mode:
Format:

Simple key-value format: converts XML elements directly to JSON key-value pairs, ignoring attributes and special XML metadata. Best for simple data extraction.

How to Use

  1. 1Paste or type your XML code into input area on the left
  2. 2The conversion happens automatically as you type
  3. 3Choose output mode: Simple KV for clean key-value pairs, or Full Structure for complete XML representation
  4. 4Select your preferred JSON formatting (Pretty, Compact, or Single Line)
  5. 5Copy result to clipboard or download as a JSON file

Features

Instant conversion with real-time preview
Two output modes: Simple KV and Full Structure
Simple mode outputs clean key-value JSON without @ or # prefixes
Full mode preserves XML attributes and text content
Multiple formatting options for different use cases
Copy to clipboard functionality
Download as JSON file
Automatic handling of repeating XML elements as arrays