XML to CSV Converter Online — Free & Private

Internally follows XML to JSON to CSV, so analysts get predictable spreadsheets without custom ETL tooling.

Loading…
XML → CSV flattening notes
Explains when XML becomes flat rows and when you need to reshape it first.

Developer notes

Irregular siblings can widen the columns in odd ways. Check the intermediate JSON. Namespace prefixes may disappear from the headers. Repeating elements, such as sibling `<product>` elements, become one CSV row per element once the JSON is unwrapped. Give the converter well-formed XML. A declaration and indentation are optional but make the markup easier to read. On the French, German and Spanish pages, the CSV output uses `;` as the column separator by default, as European spreadsheets expect (Numbers, Excel). Split very large feeds outside the browser.

Use cases

Loading nightly XML dumps into BI tools. QA teams diffing SOAP exports against CSV regression baselines. Lightweight ETL previews.

About these options

For CSV output, choose the delimiter, how fields are quoted, the line endings and whether to write a header row. Auto uses a comma in English and a semicolon in French, German and Spanish, as Excel expects. For CSV input, the delimiter is detected on the first line (comma, semicolon, tab or pipe). You choose whether that line holds the column names. JSON output can use 2 or 4 spaces or a single line, with an optional recursive key sort. XML output can be pretty-printed with a chosen indent width. YAML output takes an indent width and a quoting mode for strings. XML comments are dropped, because the conversion goes through a JSON tree.

Examples

Repeating elements as rows

Input

<?xml version="1.0" encoding="UTF-8"?> <rows> <product sku="X1"> <category>optic</category> <qty>12</qty> <warehouse>AMS</warehouse> </product> <product sku="X9"> <category>optic</category> <qty>3</qty> <warehouse>SIN</warehouse> </product> </rows>

Output

sku,category,qty,warehouse X1,optic,12,AMS X9,optic,3,SIN

Nested configuration with dotted headers

Input

<?xml version="1.0" encoding="UTF-8"?> <config env="production" region="eu-west"> <database> <host>db-primary.internal</host> <port>5432</port> <name>checkout</name> <ssl enabled="true" /> </database> <cache ttl="300"> <redis host="cache.internal" port="6379" /> </cache> <features> <flag name="checkout-v2" enabled="true" rollout="25" /> <flag name="dark-mode" enabled="false" /> </features> </config>

Output

env,region,database.host,database.port,database.name,database.ssl.enabled,cache.ttl,cache.redis.host,cache.redis.port,features.flag production,eu-west,db-primary.internal,5432,checkout,true,300,cache.internal,6379,"{""name"":""checkout-v2"",""enabled"":""true"",""rollout"":""25""}, {""name"":""dark-mode"",""enabled"":""false""}"

Related tools

Check the structure with XML → JSON, then validate it in the JSON validator, compare configurations with JSON diff or minify with our JSON minifier. Export YAML with JSON → YAML.

XML → CSV FAQ

Flattening details

Why is the CSV empty?

The intermediate JSON may not expose any rows. Convert with XML → JSON first to inspect it.

What order are the columns in?

The order follows the deterministic flattening of the nested JSON.

Does it work offline?

Yes, once the page has loaded. The conversion needs no network connection, and nothing is uploaded.

What about SOAP attachments?

They are not handled. Process MTOM payloads elsewhere first.

Convert XML to YAML, CSV, JSON, TOML, TSV and HTML.