Turn repeating XML records into a CSV table, columns are the union of every field, attributes optional, custom delimiter, RFC 4180 escaping, browser-only
- Runs locally
- Category Format Converter
- Best for Turning pasted content or local files into a handoff-friendly format.
What this tool does
Free online XML to CSV converter. Paste XML where one element repeats (rows of `<record>`, `<item>`, `<book>` and the like) and get a CSV with one row per record and one column per child field. The tool auto-detects the repeating element, takes the union of every record's fields as the header, and leaves a blank cell wherever a record is missing one, so rows stay aligned even when the source is ragged. Element attributes can come along as their own columns under an `@` prefix. Pick the column separator (comma, semicolon, tab, pipe), and every field is escaped per RFC 4180, so values that hold a comma, a quote, or a line break are wrapped and doubled correctly and never break a column. Copy the result or download a .csv straight into Excel, Numbers, or Google Sheets. Everything runs in your browser tab, nothing is uploaded, nothing is logged.
Tool details
- Input
- Text + Numbers + Structured content
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy + Download
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 9 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Format Converter · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How XML to CSV Converter fits into your work
Use it when the main problem is getting content from one practical format into another.
Conversion jobs
- Turning pasted content or local files into a handoff-friendly format.
- Previewing a conversion before you use it in a larger workflow.
- Cleaning small format mismatches without opening a full editor.
Conversion checks
- Try a small sample first when the source format is messy.
- Check character encoding, separators, and line endings after conversion.
- Keep the source until the converted output has been reviewed.
Good next steps
These links move the current task into a more complete workflow.
- 1 CSV ⇄ JSON Converter Convert CSV to JSON or JSON to CSV — handles quoted commas, newlines in cells, custom delimiter — browser-only Open
- 2 JSON Formatter & Validator Format, validate, and minify JSON instantly — right in your browser. Open
- 3 XML ⇄ JSON Converter XML to JSON converter — preserves attributes, nested elements, CDATA. Reversible. Open
Real-world use cases
Turn an XML data feed into a spreadsheet for a colleague
A supplier sends product data as an XML feed with hundreds of `<product>` elements, and someone in merchandising wants it in Google Sheets. Paste the feed, let the tool detect `<product>` as the row, and every `<sku>`, `<name>`, `<price>` becomes a column. Products that happen to carry an extra `<promo>` tag line up under one column with blanks elsewhere. Download the .csv and drop it into Sheets, no script and no "can you export this" thread.
Flatten an API XML response for quick analysis
An older SOAP or REST endpoint returns XML instead of JSON, and you just need to eyeball the records in a table. Paste the body, the repeating result element becomes rows, and nested fields flatten to dotted columns like `customer.region`. In two seconds you have a grid you can sort and filter, instead of scrolling a wall of angle brackets to compare a handful of fields across records.
Migrate legacy XML exports into a database import
You are moving off a system that only exports XML and the new tool ingests CSV. Convert the `<record>` list to CSV with attributes included so primary keys stored as `id="..."` come across as an `@id` column. Pick the delimiter your importer expects, tab or pipe if the data is full of commas, and the RFC 4180 escaping keeps any embedded commas or quotes from shifting columns during the load.
Build a CSV test fixture from a sample XML payload
You are testing code that ingests CSV and you already have an equivalent sample as XML from the real source system. Paste it, pick the separator your parser uses, and copy the output straight into your fixture file. Because escaping follows RFC 4180, a value like `he said "hi", ok` comes out correctly quoted, so the test exercises the real edge cases rather than sanitized toy data.
Common pitfalls
Expecting the root element to become a row. The root is the container, not a record. The tool picks the element that repeats under a parent, so a single `<catalog>` wrapping many `<item>` entries gives item rows, not one catalog row. If detection guesses wrong because several elements repeat, type the record element name yourself to pin it down.
Forgetting to turn on attributes when the real data lives in them. Many feeds store the key fields as attributes, like `<item sku="A1" qty="3"/>`, with little or no child text. Leave Include attributes off and those rows come out nearly empty. Tick the box and you get `@sku` and `@qty` columns with the actual values.
Pasting XML that is not well-formed and blaming the converter for empty output. An unclosed tag, a stray `&`, or mismatched nesting makes the parser reject the whole document, and the tool shows the parse error with a line number rather than guessing. Fix the markup, or run it through an XML formatter first, then convert.
Privacy
Parsing the XML (the browser's native DOMParser), detecting the record element, taking the column union, escaping per RFC 4180, and serializing the CSV are all plain JavaScript running in your tab. The data never leaves the page, nothing is logged, and the .csv download is built in-memory from a Blob, so there is no upload and no round-trip to any server. The one caveat is the shareable URL, which encodes your input in the query string only when it is short; larger payloads stay local. For sensitive XML such as customer records or internal exports, copy the CSV by hand rather than sharing the link, since URLs land in browser history and in any recipient's server logs.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- 555 Timer Calculator Astable f = 1.44/((R1+2R2)C) + monostable t = 1.1RC — pick R1, R2, C in Ω/kΩ and µF/nF, read frequency, duty cycle and pulse width — browser-only
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only