How does the tool flatten XML into CSV rows?
The converter reads the root element's direct children — typically a repeating record element such as <order>, <product>, or <user> — and treats each one as a CSV row. The header row comes from the child element names of the first record (e.g. id, customer, total). Each subsequent record fills its row by matching column names. This is exactly what spreadsheets and databases expect when importing tabular data.
What if records have different child elements?
The header row is derived from the first record. If later records contain extra fields not in the first one, those fields are dropped. If a record is missing a field, its cell is left empty. For best results, ensure your XML records share a consistent shape — or pre-process the XML to align the schema before pasting.
How are values containing commas, quotes, or newlines escaped?
The converter follows RFC 4180: a value containing a comma, double-quote, or newline is wrapped in double quotes. Embedded double-quotes inside such a value are doubled (the literal " becomes ""). This is the encoding Excel, Google Sheets, and most CSV parsers expect — your file will open correctly without manual cleanup.
Does the CSV open directly in Microsoft Excel?
Yes. The output uses comma as the delimiter and standard RFC 4180 quoting, which Excel reads natively when you save the result as a .csv file. For locales where Excel expects semicolons (Germany, France) you may need to use Excel's "Text to Columns" feature or change the system list separator.
What happens with deeply nested XML elements?
Only the first level under each record element becomes a column. If a record has nested children (e.g. <order><address><city>...</city></address></order>) the converter takes the address element's combined text content as the value. To split nested fields into columns, flatten the XML first or use the XML to JSON tool, then process the JSON in code.
Can I include XML attributes as CSV columns?
The current implementation maps element names to columns rather than attributes. If your data lives in attributes (e.g. <order id="1001">), use the XML to JSON converter first to surface attributes as @-prefixed keys, then transform that JSON to CSV with a small script — or restructure the XML so the data is in child elements before converting.
Is the conversion done on a server?
No. The DOMParser runs inside your browser. Order exports, customer lists, and any commercially sensitive XML never leaves your machine. Open DevTools → Network and click Convert — there are no requests.
How big can the XML input be?
Practically, browsers handle several megabytes of XML without trouble. For very large feeds (50+ MB) you may notice a brief pause during parsing. There are no rate limits or upload caps because nothing is sent over the network.