Online XML to JSON Converter

Convert XML documents to JSON format with support for attributes, nested structures, and arrays. This tool helps you transform XML data into JSON while preserving the document structure.

Input XML

Output JSON

Converted JSON will appear here

How to Use

  1. Paste your XML document in the input textarea
  2. Configure conversion options:
    • Preserve Attributes: Keep XML attributes as separate objects
    • Preserve Namespaces: Maintain XML namespace information
    • Text Key: Specify the key for text content in elements
  3. Click "Convert to JSON" to transform your XML
  4. Copy the resulting JSON using the copy button

Features

  • Converts XML documents to JSON format
  • Preserves XML attributes and structure
  • Handles nested elements and arrays
  • Configurable conversion options
  • Syntax highlighting for both XML and JSON
  • Error handling and validation
  • Copy to clipboard functionality