Skip to content

XML to CSV

Flatten repeated XML elements into CSV rows and columns. Nothing is uploaded.

On your device

Drop XML files here

Converted on your device. Files are never uploaded.

Up to 20 files at a time.

Options

XML exports from accounting software, catalogues and feeds are hard to read until they’re in a spreadsheet. FormatJet finds the repeated elements in your XML, makes each one a row, and turns attributes and child elements into columns of a CSV file. It runs in your browser, so the export never leaves your device.

About the formats

XMLXML file

XML stores data as nested, named elements with attributes. Feeds, office files, invoices and older web services use it.

CSVCSV file

CSV stores a table as plain text, one row per line with commas between the values. Spreadsheets, databases and almost every data tool can read and write it.

Converted with Data converters (Papa Parse, yaml, fast-xml-parser), Data converters on Workers.

Questions

Which elements become rows?

The repeated ones. If your XML holds many <order> elements, each one is a row, and its attributes and child elements become the columns.

What are the column names for attributes?

The attribute’s own name, without the @ sign that XML to JSON adds, so id="7" gives a column called id. An element’s own text goes in a column called value, unless another column already has that name.

How are nested elements handled?

They become dotted column names, like customer.name. Repeated simple values end up in one cell separated by “; ”, and repeated groups of elements are written into the cell as JSON text.

Which separator should I choose?

Comma, the default, suits most tools. Pick Semicolon if your spreadsheet uses commas as the decimal mark, or Tab for software that expects tab-separated text.

XML to CSV with the API

The conversion API opens later this year.

curl https://api.formatjet.com/v1/convert?to=csv \
  -H "Authorization: Bearer fj_test_…" \
  -F file=@input.xml -o output.csv