CSV text is the main result
As soon as the XML parses, you get flattened CSV you can copy or save as a .csv file. There is no searchable grid on this page — that workflow lives on XML to Table.
Paste XML on the left. Repeating sibling records become rows; nested objects flatten to dotted columns.
A two-product catalog with origin, tags, reviews, and attributes
XML is turned into CSV in this browser tab only. Pasted markup and local .xml files are read here; they are not posted to our servers, and this page is not a file-hosting service.
Drop in an XML document, let repeating records become rows, and copy or download CSV text. This is a spreadsheet export, not a searchable on-page grid.
Paste a document or upload a local .xml file. The converter looks for repeating sibling records — for example each product under a catalog — and treats those as rows. Prefer a visual preview first? Use XML to Table. To inspect the same tree as JSON, open XML to JSON.
<?xml version="1.0" encoding="UTF-8"?>
<catalog currency="USD">
<product id="P-100" in_stock="true">
<name>Wool Scarf</name>
<price>24.00</price>
<origin>
<city>Lisbon</city>
<country>PT</country>
</origin>
<tags>
<tag>wool</tag>
<tag>winter</tag>
</tags>
<reviews>
<review rating="5">Soft and warm</review>
<review rating="4">Runs slightly large</review>
</reviews>
</product>
<product id="P-200" in_stock="false">
<name>Linen Tote</name>
<price>18.50</price>
<origin>
<city>Porto</city>
<country>PT</country>
</origin>
<tags>
<tag>linen</tag>
<tag>bag</tag>
</tags>
<reviews>
<review rating="5">Holds a day's shopping</review>
<review rating="4">Straps could be longer</review>
</reviews>
</product>
</catalog>Each nested object becomes dotted keys (origin.city). Attributes are written with an @_ prefix (@_id, @_in_stock). A simple list of text values shares one cell; a list of child objects is kept as a JSON string so the row count does not explode.
name,price,origin.city,origin.country,tags.tag,@_id,@_in_stock
Wool Scarf,24,Lisbon,PT,"wool, winter",P-100,true
Linen Tote,18.5,Porto,PT,"linen, bag",P-200,falseCopy the CSV or download a .csv file. Choose comma, semicolon, tab, or pipe as the delimiter. If you started from JSON rather than XML, use JSON to CSV. To turn a spreadsheet export back into objects, use CSV to JSON.
The converter writes a spreadsheet: one row per record, with paths and attributes as headers.
| Ingredient | What appears in the CSV |
|---|---|
| Repeating siblings | Each product (or similar record) becomes one CSV row |
| Nested object | origin.city and origin.country — dotted paths |
| Attribute | @_id, @_in_stock — the @_ prefix is applied consistently |
| Simple text list | tags.tag becomes "wool, winter" in a single cell |
| Nested object list | reviews.review is stored as a JSON string, not extra rows |
As soon as the XML parses, you get flattened CSV you can copy or save as a .csv file. There is no searchable grid on this page — that workflow lives on XML to Table.
If the document contains only one product (or another record) and no sibling list, the converter still writes a header plus one data row, including dotted keys for any nested child object.
Documented on 2026-11-24 so the CSV is not mistaken for a lossless dump of every XML feature.
Text mixed with child elements, namespace prefixes, comments, and DTD declarations are not fully represented. Deeply irregular trees may also collapse into fewer columns than you expect.
A value such as 24.00 can appear as 24 when it is recognized as a number. Attributes and text are trimmed. If a parse fails, the error includes a line and column when available.
A nested list of objects is written as a JSON string so a product with several reviews still occupies a single row. Only repeating siblings of the record itself add rows.
This page starts from XML and writes CSV. Other pages start from a JSON tree or a spreadsheet.
XML to Table renders searchable rows and can export from the table controls if you prefer to inspect the grid first.
XML to JSON keeps the document as nested objects instead of flattening it into columns.
Use JSON to CSV when the source is JSON. Use CSV to JSON when you want objects back from a delimited file.
Questions about flattening records, attribute columns, delimiters, and how this differs from a table preview
Edit, format, and beautify JSON
Validate, fix, and inspect JSON
Compare, measure, and map JSON
Convert JSON to other formats
Convert other formats to JSON
Convert, format, fix, and minify XML
Generate code and format other languages