Logo
Prompt Minds

XML to CSV Converter

Drop an XML file and get a clean CSV table — records are detected automatically, attributes and nested elements become columns, and repeated values are kept.

XML फ़ाइल डालें और साफ़ CSV टेबल पाएँ — records अपने-आप पहचाने जाते हैं।

100% private — runs in your browser · Last Updated: October 2026
—
Each record becomes a row. Attributes become columns starting with @, nested elements become dotted columns (address.city), and repeated child elements are joined with “; ”.
PDNob logoPDNob Your Lightweight AI-Powered PDF Editor Edit · Convert · Compress · OCR · AI Download for Desktop

Quick Tips

Pick a different record tag if rows look wrong
Attributes appear as @columns
Nested fields appear as parent.child
Keep BOM on for Excel and Hindi
Use XML to Excel for a direct .xlsx
All Tools
Advertisement

Quick Answer

Drop your XML file (or paste XML) and the tool finds the element that repeats once per record — like , or — and turns each one into a CSV row. Attributes become columns starting with @, nested elements become dotted columns such as customer.city, and repeated child elements are joined with a semicolon. Check the preview, pick a different record element if needed, and download the CSV.

Why Convert XML to CSV?

XML is great for machines but awkward for people. Order exports, product feeds, bank statements, e-invoice data, RSS feeds, sitemaps and many government or ERP downloads arrive as XML, yet most of us want to sort, filter and total that data in a spreadsheet. CSV is the universal table format that Excel, Google Sheets, databases and BI tools all understand.

The hard part is that XML is a tree and CSV is flat. This XML to CSV converter (XML से CSV) handles the flattening for you: it finds the element that represents one record, turns every attribute and nested field into a column, and keeps repeated values instead of dropping them. It runs entirely in your browser, so confidential exports never leave your computer.

How to Use It

  1. Drop an XML file (.xml, .rss, .kml, .gpx or .txt) or paste XML into the box. A sample orders file is preloaded.
  2. Check the status line: it says how many records were found, which element was used, and how many columns resulted.
  3. Change the record element from the dropdown if the auto-detected one isn't what you want. Each repeating tag is listed with its count.
  4. Review the preview — the first rows of the table appear below.
  5. Choose a delimiter, keep Add BOM on for Excel, and download or copy the CSV.

How Records Are Detected

In almost every data-style XML file, records are a list of identical sibling elements: <order> elements inside <orders>, <item> inside an RSS <channel>, <url> inside a sitemap's <urlset>. The converter walks the whole document and picks the tag that repeats most often under a single parent. That rule picks the right element for the vast majority of files.

When a file has several lists — say 20 <order> elements, each with a few <item> lines adding up to 60 — you may want a different level. The dropdown lists every repeating tag with its total count across the document, so you can choose orders (one row per order, with items joined) or items (one row per item line).

How Each Record Is Flattened

Consider this record:

<order id="101" date="2026-10-01">
  <customer><name>Asha</name><city>Patna</city></customer>
  <item>Pen</item>
  <item>Notebook</item>
  <total currency="INR">55</total>
</order>

It becomes one CSV row:

@id@datecustomer.namecustomer.cityitemtotaltotal@currency
1012026-10-01AshaPatnaPen; Notebook55INR
  • Attributes of the record become columns starting with @.
  • Simple child elements become columns named after the tag.
  • Nested elements become dotted paths, like customer.city, at any depth.
  • Attributes of child elements become path@attribute, like total@currency.
  • Repeated child elements are joined in one cell with "; " so nothing is lost.

Records don't need identical fields. The header is the union of every field found, in the order first seen, and a record that lacks a field simply gets an empty cell.

Why Not Just Open XML in Excel?

Desktop Excel can import XML through Data → Get Data → From File → From XML, which opens Power Query. It works well for simple files, but nested elements appear as "Table" cells you must expand one by one, repeated children can multiply rows, and Excel on the web and on phones has no XML import at all. This converter gives you a flat, predictable table in one step on any device, and lets you choose the record level without learning Power Query.

Common Uses

  • Order and invoice exports: turn marketplace, ERP or billing XML into a sheet for reconciliation and GST working.
  • Product feeds: audit prices, stock and titles in a shopping feed using spreadsheet filters.
  • Sitemaps: get every URL and last-modified date of a website into a table for SEO audits and content reviews — the record element is url, detected automatically.
  • RSS and podcast feeds: list episode or article titles, links and dates — the record element is item.
  • Maps and GPS: export KML placemarks or GPX track points with their coordinates.
  • Bank and payment files: view transaction XML in a readable table, then filter by date, amount or beneficiary to find exactly what you need.
  • Data migration: move XML records into a database or CRM through its CSV import feature.

Delimiter and Excel Settings

Comma is the standard delimiter. Choose semicolon if your Excel uses commas as the decimal separator (common in European settings), tab for TSV, or pipe for systems that expect it. Values containing the delimiter, quotes or line breaks are quoted automatically according to the CSV standard. Add BOM places an invisible marker at the start of the file so Excel recognises UTF-8 — keep it on if the data contains Hindi, other Indian scripts or the ₹ sign. If you want a ready-made spreadsheet instead, our XML to Excel converter uses the same flattening and saves an .xlsx file directly.

When the XML Is Invalid

XML must be perfectly well-formed. If a tag isn't closed, an ampersand isn't escaped or there are two root elements, the browser's parser rejects the document and the status line shows its message — usually with a line and column. Fix that spot and the table appears instantly. Exports cut off halfway (for example, an incomplete download) also fail this way; download the file again.

Worked Example: A Sitemap

A sitemap looks like this:

<urlset>
  <url><loc>https://example.com/</loc><lastmod>2026-10-20</lastmod></url>
  <url><loc>https://example.com/about/</loc><lastmod>2026-09-02</lastmod></url>
</urlset>

The converter detects url as the record and produces a two-column CSV with loc and lastmod. Sort by lastmod in Excel to find pages that haven't been updated in a long time — a quick content audit without any paid SEO software or plugins.

What About Text Mixed with Tags?

Data XML usually keeps values in leaf elements, but some files mix text and tags in documents such as articles or descriptions. If the record element has no child elements at all, its text becomes a #text column. For leaf elements, the full text content is used, trimmed of surrounding whitespace. HTML stored inside CDATA sections — common in RSS descriptions — appears as the raw markup in the cell, which you can clean up in the spreadsheet if needed.

Works on Any Device

You only need a modern browser on Windows, macOS, Linux, Android or iPhone. Nothing is installed, no account is needed, and the conversion itself never contacts a server, so it also works with a slow or unreliable connection once the page is open. On a phone, open an XML attachment from your Files app, download the CSV and share it straight to Sheets or email.

CSV, Excel or JSON?

ChooseWhen
CSV (this tool)Importing into databases, other software or Google Sheets
Excel (.xlsx)Sharing a ready-to-use spreadsheet with numbers stored as numbers
JSONKeeping the full nested structure for code and APIs

Large Files

XML files up to 50 MB can be opened. Parsing is fast, but very large documents need memory proportional to their size, so a desktop browser is the best choice for big exports. The preview shows the first rows only; the download always contains every record. If the CSV ends up with more than about a million rows — Excel's limit per sheet — split it with our Split CSV tool.

Tips for Better Tables

  • Choose the right level: one row per order or one row per item line — use the record dropdown.
  • Split joined values in Excel with Data → Text to Columns, using ";" as the delimiter, if you need repeated items in separate columns.
  • Rename long dotted headers in the spreadsheet after converting, for a cleaner report.
  • Remove namespace clutter: prefixed tags such as g:price keep their prefix in the column name, which is accurate but can be renamed later.

Safe and Private

The converter uses the browser's built-in XML parser, which does not run scripts or fetch external resources, so opening an XML file here is safe. The CSV is built locally with the open-source PapaParse library. Nothing is uploaded, logged or stored — close the tab and the data is gone.

Quick Glossary

  • Record element: the XML element that represents one row, such as <order>.
  • Flattening: turning nested data into a single row of columns.
  • Attribute: a name="value" pair inside an XML start tag.
  • BOM: an invisible marker that tells Excel the CSV is UTF-8.

Why Use This Converter?

It detects records automatically, flattens nested XML without losing repeated values, lets you pick the level you need, and keeps your data on your device — all free. Related tools: XML to JSON, CSV to XML and CSV to Excel.

XML to CSV Converter — Key Facts

InputXML, RSS, KML, GPX
OutputCSV / TSV (UTF-8)
RecordsAuto-detected or chosen
Attributes@name columns
Nested dataDotted columns (a.b)
PrivacyRuns in your browser

Frequently Asked Questions

How do I convert XML to CSV?

Drop the XML file into the box or paste the XML. The tool detects the records, shows a preview and lets you download or copy the CSV.

How does it know which element is a row?

It looks for the element that repeats most often under the same parent — for example many elements inside — and uses each one as a row. You can choose a different repeating element from the list.

What happens to XML attributes?

Each attribute becomes a column whose name starts with @, such as @id or @date.

How is nested XML flattened?

Nested elements become dotted column names: Patna becomes a customer.city column.

What if an element repeats inside a record?

Repeated child elements, like several tags in one order, are joined into one cell separated by '; ' so no value is lost.

Will records with different fields line up?

Yes. The columns are the union of all fields across records, in the order first seen; missing values are left blank.

Can I open the CSV in Excel?

Yes. Keep 'Add BOM' ticked so Excel shows Hindi and ₹ correctly, or use our XML to Excel tool to get an .xlsx directly.

Can I convert RSS feeds or sitemaps to CSV?

Yes. For RSS, the record element is item; for a sitemap, it is url. Both are detected automatically.

What if my XML is invalid?

The parser's error message is shown, usually with the line number, so you can fix the problem.

Is there a size limit?

XML files up to 50 MB can be loaded; very large files work best in a desktop browser.

Are my files uploaded?

No. Parsing and conversion happen entirely in your browser.

Is it free?

Yes, completely free with no sign-up.

XML to CSV, Simplified!

Auto-detected records, flattened columns — free and private.

Explore More Prompt Minds Tools

XML to CSV Converter works great alongside our other free tools. Every Prompt Minds tool runs entirely in your browser — no sign-up, no uploads, no watermarks. Browse all free tools.

Prompt Minds AI Assistant
Namaste! How can I help you with XML to CSV Converter?