en

XML to JSON

Convert an XML file to JSON locally - with elements and attributes, no upload, right in your browser.

Indent JSON

Running locally on your device ...

0%

Your files never left your device

    Is my file uploaded?

    No. Everything runs in your browser - your file never leaves your device. How this is verifiable

    No upload100% local
    Your content stays with youno third-party access
    Servers in GermanyGDPR by design
    Independently auditedTLS A+ · HTTP headers A+

    XML is a widespread, hierarchical data format - typical for RSS feeds, SOAP APIs, Office documents, configs and data exchange between systems. For processing in modern programs and APIs, JSON is handier though. This tool translates the tree structure of XML into an equivalent JSON object.

    This tool parses your XML entirely locally in your browser (fast-xml-parser, pure JavaScript). Nested elements become nested objects and attributes are kept with the "@_" prefix, so no information is lost. Invalid XML is rejected with a clear error. Nothing is uploaded.

    You will meet this when evaluating a news feed, a sitemap, a bank-statement interface or an old data-export spec that still thinks in angle brackets. When reading the result, note one quirk: if a child element occurs only once, a single object arises, whereas on repetition a list does. Accounting for that in the consuming code avoids surprising edge cases when the count varies.

    Specifications

    Specifications
    Input formatsXML
    Output formatJSON
    Batch processingNo
    ProcessingLocally in your browser (JavaScript)
    File uploadNone

    In 3 steps

    1. Drop or pick your XML file.
    2. Choose formatting (indented or compact).
    3. Download the JSON file.

    Limitations: The XML must be well-formed (otherwise a clear error). Attributes get the "@_" prefix. Comments and processing instructions are skipped. Mixed content (text alongside child elements) cannot always map unambiguously. Namespaces stay as a prefix in the key.

    FAQ

    Is my file uploaded?

    No. The conversion runs entirely locally in the browser - nothing is sent.

    Are attributes kept?

    Yes. Attributes appear in the JSON with the "@_" prefix before the name.

    What happens with invalid XML?

    You get a clear error message with the cause - no crash.

    Can I output compact JSON?

    Yes, the option lets you choose indented or compact JSON.

    Related tools