XML to JSON converter

Convert XML to JSON, either as a flat array of rows or with the full element tree preserved. Runs in your browser, free, no sign-up.

    Drop XML files here or choose files.

    • Up to 50MB and 1,000,000 rows per file
    • Up to 10 files at a time

    Table: each repeating element becomes one object in an array. Tree: the element hierarchy is kept as nested objects.

    Turn off to write every value as a string ("123"). Values with a leading zero stay strings even when on.

    Turns an "address.city" column into { "address": { "city": ... } }.

    Files never leave this device. Privacy policy

    Result

    Add an XML file and click Convert. The JSON file shows up here.

    What to do next

    How it works

    Add an XML file, choose the JSON shape and click Convert. The output uses two-space indentation.

    In Table shape, The tool looks for a repeating element and reads each one as a row. If <item> appears several times, each <item> becomes a row. Attributes become @name columns and nested elements become dot-path columns (address.city).

    Things to know

    Comments, processing instructions and the DOCTYPE are not carried over. In document-style XML that mixes text and elements, the text order can change.

    Frequently asked questions

    What is the difference between Table and Tree?

    Table gives you an array with one object per repeating element (such as <item>), which is convenient for data processing. Tree copies every element from the root as nested objects: repeated names become arrays, attributes become "@name" keys, and mixed text and elements go under "#text".

    Numbers come out as strings.

    Turn on Numbers and true/false as values. Values with a leading zero stay strings.

    Do my files get uploaded anywhere?

    No. Everything runs inside this browser tab and the files never leave your device. The results disappear when you close the page, so save what you need.

    Related tools