Skip to main content
DataFormatKit
Text to CSVCSV to ExcelJSON to ExcelJSON to CSVXML to CSVCSV Validator
Open Text to CSV

Conversion tools

Text to CSVCSV to ExcelJSON to ExcelJSON to CSVXML to CSVCSV Validator

Ideas & support

Suggest a converter
Current tool
1

XML source

Add XML or select a local .xml file. Your source stays in your browser.

Drag and drop · XML · 10 MB maximum
0 B entered
2

Record mapping and CSV output

Select the repeating element used for rows and configure repeated child values.

XML parser policyDTD and custom ENTITY declarations are rejected before the document is parsed.

CSV output

3

CSV output review

Validation results and export actions appear here.

No XML data has been validated

Add an XML document, validate it, then confirm the row element and output columns.

XML to CSV Converter
with Explicit Row Selection

Convert XML to CSV after choosing which repeating element represents one row. Review attributes, namespace prefixes, CDATA, and repeated children before downloading the flat file locally.

✓ Selectable record element✓ Attributes and namespaces preserved✓ DTD declarations rejected
Return to the converter

From XML hierarchy to the right CSV rows

The flat result depends on three decisions: which repeating element defines a row, how attributes and nested fields become columns, and how repeated children should be represented. The preview makes each mapping visible before export.

  1. 01

    Validate the XML document

    Paste XML or choose a local file. The browser parser rejects DTD and custom ENTITY declarations, then identifies repeating elements that could represent rows in the flat result.

  2. 02

    Choose records and repeated values

    Select the repeating element that defines one complete row. Attributes become @-prefixed columns, namespace prefixes remain visible, and repeated scalar children can stay as JSON text or be joined.

  3. 03

    Review and download CSV

    Inspect row count, flattened columns, leading-zero identifiers, CDATA, and repeated-child transformations. Convert XML to CSV only after the preview reflects the hierarchy you intended to flatten.

See attributes and repeated children together

<catalog>
  <item code="001">
    <name>Ada</name>
    <tag>new</tag>
    <tag>priority</tag>
  </item>
  <item code="002"><name>Lin</name></item>
</catalog>

Choose Use sample in the converter, then select Validate and preview. With /catalog/item selected and Keep as JSON arrays enabled, expect 2 rows and 3 columns: name, tag, and @code. Ada's tags stay together as JSON text; Lin's missing tag stays blank. The codes remain 001 and 002 in the preview.

Return to the converter

What a flat CSV cannot represent

  • XML file to CSV processing rejects DTD and custom entity declarations.
  • XML to CSV tables may not suit publishing documents with mixed content.
  • XML input is limited to 10 MB, and output is limited to 50,000 result rows.

XML to CSV questions before download

Direct answers about record elements, attributes, namespaces, repeated children, and parser safety.

How does an XML hierarchy become flat rows?

A selected repeating element becomes the record boundary, and its attributes and descendants become columns. Inspect the preview to confirm that each source record creates one intended row before downloading the flat result.

How do I choose the correct record element?

Select the repeated element that contains one complete business record, such as item rather than a nested tag. Compare the selected-node count with the previewed row count and inspect which parent fields appear in each row.

Are attributes, namespaces, and CDATA retained?

Yes. Attributes appear as @-prefixed columns, namespace prefixes remain visible in record and field names, and CDATA is read as source text. The preview also shows how repeated children will be represented.

Can I process a document that declares a DTD?

No. The parser rejects DOCTYPE and custom ENTITY declarations before conversion to prevent entity expansion. Standard built-in XML entities remain supported when the rest of the document is valid.

Need a different source or output?

Convert text to CSV

Diagnose delimiters and uneven rows in flat text.

→
Convert CSV to Excel

Move a finished CSV table into a text-safe XLSX workbook.

→
Convert JSON to Excel

Map nested JSON records into an XLSX workbook with text-safe identifiers.

→
Convert JSON to CSV

Flatten nested objects and choose how arrays become CSV values.

→
DataFormatKit

Small, inspectable data conversions that run in your browser.

Support DataFormatKit

Tools

Text to CSVCSV to ExcelJSON to ExcelJSON to CSVXML to CSVCSV Validator

Trust

PrivacyTermsAboutRequest a feature
© 2026 DataFormatKitNo account. No source-file upload. No hidden conversion.