XML to CSV Converter
XML input
Paste a flat XML table with up to 1,000,000 characters. Conversion happens in this browser.
Convert a simple XML table into comma-separated CSV without sending its contents anywhere. The converter expects one root containing direct row elements with the same name. Row attributes become columns such as @id, while direct child elements become ordinary columns. It deliberately rejects nested or ambiguous XML instead of guessing how to flatten it.
How to convert flat XML to CSV
-
1
Paste the XML
Enter well-formed XML of up to 1,000,000 characters. DOCTYPE and ENTITY declarations are rejected.
-
2
Check the table shape
Every direct child of the root must be the same row element, with attributes and unique direct text fields only.
-
3
Review rows and columns
The second step shows the detected table size before you create the export. Limits are 10,000 rows and 200 columns.
-
4
Copy or download
Copy the comma-separated CSV or download it as UTF-8, then start over to clear the local draft.
Accepted XML shape
The root must contain one or more direct row elements, all with the same element name. Each row may have attributes and direct child elements whose contents are plain text:
<contacts>
<contact id="1">
<name>Ada</name>
<city>London</city>
</contact>
<contact id="2">
<name>Lin</name>
<city>Taipei</city>
</contact>
</contacts>
This becomes:
@id,name,city
1,Ada,London
2,Lin,Taipei
Attributes use an @ prefix so they remain distinct from child elements. A field missing from one row produces an empty cell.
What is rejected
- Invalid XML, an empty root, or a document with no row elements
- A
DOCTYPEorENTITYdeclaration - Different row element names under the same root
- Child fields that contain nested elements
- The same child field repeated within one row
- More than 1,000,000 input characters, 10,000 rows, or 200 columns
The converter does not offer XPath, namespace controls, upload, an API, nested-data flattening, explode or join strategies, alternate separators, or a BOM option. Reshape hierarchical XML into a flat table before using it.
CSV output and spreadsheet safety
The output uses commas and UTF-8. CSV quoting keeps commas, quotes, and line breaks inside their fields. Values beginning with =, +, -, or @ are protected so spreadsheet software reads them as text rather than formulas. Review the downloaded data before importing it into another system.
Browser-local privacy
Parsing, validation, preview, copying, and download all happen in your browser. XML and CSV content are not uploaded, sent through Livewire, placed in the URL, or saved to a server-side history. The three-step flow may keep one private local draft for the page session; Start over clears it. Do not paste sensitive data on a device you do not trust.
Frequently Asked Questions
No. It accepts only a root with uniform direct row elements, whose direct child elements contain text rather than further elements. This strict shape avoids an arbitrary or misleading flattening result.
Each row attribute becomes a column prefixed with @, such as id="7" becoming @id. Direct child elements use their element names as columns.
It produces comma-separated UTF-8 CSV. There are no controls for another separator or a BOM. Values that could begin a spreadsheet formula are protected as text.
No. The input and result stay in the browser and do not enter the URL or server history. Start over clears the local draft used by the three-step flow.
Related Tools
Subtitle Converter
Convert SRT subtitles to WebVTT or VTT captions to SRT locally. Validate cue timings, preserve multiline text, then copy or download the result.
M4A to MP3 Converter
Convert M4A audio to MP3 for wider playback support. Upload an .m4a file and download a compatible .mp3 copy.
MKV to MP4 Converter
Convert MKV videos to MP4 for smoother playback on iPhone, iPad, QuickTime, browsers, TVs and editors. Upload a .mkv file and download a compatible .mp4.
Word to Markdown Converter
Convert a Word DOCX file to clean Markdown in your browser. Keep headings, lists, links and simple tables, then copy or download the editable .md file.
Archive Extractor
Inspect ZIP, JAR, XPI, DOCX, XLSX, PPTX and ODT containers locally in your browser, then download individual files without uploading the archive.
CSV to Excel
Convert CSV data to a single-sheet XLSX workbook in your browser. Review delimiters, preserve identifiers, infer safe numbers, and keep file contents local.