Private browser-based conversion

    XML to JSON Converter

    Convert well-formed XML documents into readable JSON for APIs, JavaScript, and modern data workflows. Elements become object properties, repeated elements become arrays, and attributes remain distinguishable.

    Convert XML to JSON

    Paste XML or upload an .xml file. The browser validates it before creating formatted JSON on your device.

    JSON
    YAML
    XML
    .properties
    TOML
    CSV

    Press Ctrl/⌘ + Enter to convert.

    CSV is best for arrays of records; XML attributes use @_ keys in other formats.

    Predictable conversion

    How XML maps to JSON

    The converter applies clear rules so you can understand the output before using it in another tool or workflow.

    Elements become properties

    The XML root and nested child elements become JSON keys. Text values such as numbers and booleans are inferred where possible.

    Attributes use an @_ prefix

    An XML attribute such as id becomes @_id in JSON, keeping it separate from a child element with a similar name.

    Repeated elements become arrays

    Sibling elements with the same name are represented as a JSON array, while numeric and boolean text values are recognized where possible.

    Four quick steps

    How to convert XML to JSON

    No signup or installation is required. Paste content or choose a local file, convert it, and save the result.

    1. 1

      Paste a well-formed XML document or upload an .xml file.

    2. 2

      Leave XML selected on the left and JSON selected on the right.

    3. 3

      Select Convert to JSON; any XML syntax problem will be shown before conversion.

    4. 4

      Copy the indented JSON or download it as a .json file.

    Questions & Answers

    XML to JSON FAQ

    Answers about file handling, conversion rules, and the generated JSON output.