Instant · Free · No sign-up

XML to CSV Converter — made simple

Paste your XML or upload a feed, get a clean CSV file ready for Excel, Google Sheets, or any spreadsheet app. Auto-detects the structure and handles attributes.

Converter — Ready
Awaiting input
Your CSV preview will appear here.
0 rows 0 columns Auto row element
Browser-only processing
No file upload to server
Instant conversion
100% free forever
The basics

What is an XML to CSV converter?

An XML to CSV converter parses a well-formed XML document and produces a CSV file where each repeating element becomes one row, and each child element or attribute becomes a column. XML's hierarchy is flattened into a table that opens directly in Excel, Google Sheets, or any BI tool.

XML (eXtensible Markup Language) is the older cousin of JSON. It dominated web services in the 2000s and is still the lingua franca of enterprise systems: SOAP APIs, RSS/Atom feeds, Microsoft Office file formats, configuration files, and countless legacy data feeds. The structure is verbose but precise — every field has explicit start and end tags, attributes are first-class, and schemas can enforce the entire shape of the document.

The challenge: most modern data tools (Excel, Google Sheets, SQL databases, BI platforms) want a flat table, not a tree. An XML to CSV converter bridges the two — it walks the XML tree, picks a "row element" (usually the most common repeating child of the root), and emits one CSV row per occurrence with the child elements and attributes as columns.

Step by step

How to convert XML to CSV in 3 steps

Most conversions take less than a minute. No login, no upload to a server, no installation.

  1. Paste or upload

    Drop a .xml, .rss, or .atom file into the upload zone, or paste XML text. The converter auto-detects the row element (the repeating child of the root).

  2. Choose options

    Open the settings cog to decide whether to include attributes, how to flatten nested elements, and which delimiter to use. Live preview updates as you change options.

  3. Download

    Click Download CSV to save the file. Open it directly in Microsoft Excel, Google Sheets, Numbers, or any spreadsheet app.

Why HopConvert

Built for the XML you actually have

Real XML has attributes, namespaces, mixed content, and nesting. HopConvert handles all of it.

Auto-detect row element

Sniffs the document and picks the most likely repeating element. Override in settings for tricky schemas.

Attributes as columns

Include XML attributes as columns prefixed with @. Toggle off in settings if you'd rather ignore them.

Nested-element flattening

Child elements become columns with a separator. address/city becomes address__city. Configurable.

Browser-only privacy

Every byte is processed in your browser. Nothing is uploaded, logged, or stored on our servers.

RSS / Atom support

Standard feed formats are recognised automatically. and elements become rows with title, link, pubDate as columns.

Custom delimiters

Comma, tab, semicolon, or pipe. Tab is best for Excel paste; semicolon for EU locales; pipe for data with embedded commas.

Comparison

XML vs CSV: what's the difference?

Both store structured data, but they're designed for very different jobs.

AspectXMLCSV
StructureHierarchical (nested elements, attributes)Flat tabular (rows and columns)
Best forEnterprise APIs, document formats, configuration, RSSSpreadsheets, BI tools, human analysis, databases
File sizeLargest (verbose tags)Smallest (plain text)
Human readabilityModerate (tag noise)High (opens directly in Excel)
Schema supportStrong (XSD, DTD)None (implicit from header)
AttributesFirst-classNot supported
NamespacesSupportedNot supported
Use cases

When teams reach for XML to CSV

XML is still everywhere in enterprise, and CSV is what most data tools want. The bridge is XML to CSV.

RSS / Atom feeds

Convert a blog or news feed into a spreadsheet to track publishing, monitor topics, or feed into a research tool.

SOAP API responses

Many enterprise APIs still use SOAP. Convert the response XML to CSV to import into a database or BI tool.

Microsoft Office files

Word, Excel (older formats), and PowerPoint all use XML internally. Extract data from .docx or .xlsx packages.

Configuration files

Maven, Ant, Spring, and countless other tools emit XML configs. Convert to CSV for human review or documentation.

Legacy data exports

Older ERP, CRM, and accounting systems often export only XML. Convert to CSV before importing into modern tools.

Scientific data

Many scientific formats (SBML, KML, GML) are XML. Researchers use CSV conversions for analysis in R, Python, or Excel.

The complete guide

XML to CSV: the complete guide

Everything you need to know about the XML format, the CSV output, and how to handle real-world documents.

How is XML structured?

XML is a tree of nested elements, each with optional attributes and text content. A document always has exactly one root element; everything else is a descendant of the root. Here's a minimal example:

<?xml version="1.0" encoding="UTF-8"?>
<catalog>
  <book id="1">
    <title>The Pragmatic Programmer</title>
    <author>Andy Hunt</author>
    <year>1999</year>
    <price>42.50</price>
  </book>
  <book id="2">
    <title>Clean Code</title>
    <author>Robert Martin</author>
    <year>2008</year>
    <price>38.00</price>
  </book>
</catalog>

The tree structure is what makes XML powerful — you can represent arbitrary relationships — but it's also what makes it hard to fit into a flat spreadsheet. The conversion collapses the tree into rows and columns.

How is the "row element" chosen?

Every XML to CSV conversion has to pick a "row element" — the element whose repeated instances become the rows of the CSV. The converter auto-detects this by looking for the most common direct child of the root element. In the example above, <book> is the obvious choice because <catalog> has two <book> children.

Sometimes the choice isn't obvious. An RSS feed has a single <channel> with many <item> children — the items are the rows. A SOAP response may have a single root with nested arrays — the deepest repeating element is usually the row. If auto-detect picks the wrong element, override it in the settings.

Common row element names to expect: item, entry, row, record, product, order, customer, user. If your XML uses something obscure, just type the element name in settings.

How are attributes handled?

XML attributes are key-value pairs on the opening tag of an element, like <book id="1"> where id is the attribute. They are first-class in XML and often carry the most important identifiers (IDs, types, references).

By default, HopConvert includes attributes as columns prefixed with @. The example above becomes:

@id,title,author,year,price
1,The Pragmatic Programmer,Andy Hunt,1999,42.50
2,Clean Code,Robert Martin,2008,38.00

The @ prefix makes attributes visually distinct from child elements, especially when an attribute and a child element share the same name (which is legal in XML). You can change the prefix to anything you like in settings, or disable attribute inclusion entirely.

How are nested elements flattened?

When a row element contains nested children, those become columns. By default, nesting is flattened with a separator — <address><city>NYC</city></address> becomes the column address__city. The separator is configurable (__, ., /, etc.).

For deeper nesting, the rule applies recursively: <author><name><first>Andy</first><last>Hunt</last></name></author> becomes author__name__first and author__name__last. If a column name gets unwieldy, you can also use a "concatenate" strategy that joins all leaf values into a single column per row.

What about XML namespaces?

Namespaces are XML's way of avoiding element name collisions — <ns:title> and <atom:title> can coexist in the same document. By default, the converter strips namespace prefixes for cleaner column names (title instead of ns:title). If you need the prefix preserved, enable it in settings.

SOAP responses are heavily namespaced (<soap:Envelope>, <soap:Body>, etc.). The converter handles them without special configuration — the prefixes are stripped, and the underlying element names become the column names.

Common XML formats

These formats all work out of the box with HopConvert's auto-detect:

  • RSS 2.0: <rss><channel><item>...</item></channel></rss> — row element is item, columns include title, link, description, pubDate.
  • Atom 1.0: <feed><entry>...</entry></feed> — row element is entry, columns include title, updated, summary, author/name.
  • SOAP responses: <soap:Envelope><soap:Body><GetProductsResponse><Product>...</Product></GetProductsResponse></soap:Body></soap:Envelope> — the deepest repeating element is auto-detected as the row.
  • Sitemaps: <urlset><url>...</url></urlset> — row element is url, columns include loc, lastmod, changefreq, priority.
  • SVG: <svg><path>...</path></svg> — useful for extracting geometry data from vector graphics.
  • KML (geographic): <kml><Placemark>...</Placemark></kml> — row element is Placemark, columns include name, description, and Point/coordinates.

Common edge cases

Real-world XML is rarely as tidy as the textbook example. Here are the most common gotchas and how the converter handles them:

  • Mixed content (text + child elements): <p>Hello <em>world</em>!</p> — the text is concatenated and the child element is added as a separate column.
  • Repeated children with the same name: <person><phone>555-1234</phone><phone>555-5678</phone></person> — joined with a delimiter (default | ) into a single phone column.
  • Empty elements: <description></description> — output as an empty cell.
  • Self-closing tags: <br/> — output as an empty cell or, if attributes are present, an @attr column.
  • CDATA sections: <![CDATA[<raw html>]]> — the raw content is preserved as the cell value, with the angle brackets escaped for CSV.
  • XML declaration and DOCTYPE: Stripped before parsing. The <?xml ?> header and any <!DOCTYPE> declarations are removed automatically.
  • Namespaces in tags: <ns:title xmlns:ns="..."> — the prefix is stripped (or preserved, per settings) and the local name is used as the column header.
  • Comments and processing instructions: Stripped before parsing. Comments (<!-- -->) and processing instructions (<? ?>) are ignored.
FAQ

Frequently asked questions

Everything you need to know about converting XML to CSV with HopConvert.

What is an XML to CSV converter?
An XML to CSV converter parses a well-formed XML document and produces a CSV file where each repeating element becomes one row and each child element or attribute becomes a column. XML's hierarchy is flattened into a table that opens directly in Excel or Google Sheets.
Which XML element becomes the row?
The converter auto-detects the most common repeating direct child of the root element. For RSS feeds that's item, for SOAP responses it's the operation-specific element, for arbitrary XML it's whichever child element appears most often. You can override the choice in settings.
How are attributes handled?
By default, XML attributes are included as columns prefixed with @ (for example, @id, @type). You can toggle this off in settings if you'd rather ignore attributes, or set the prefix to a different character.
What about nested elements?
Nested child elements are flattened with a separator. For example, address/city becomes the column address__city. The separator is configurable in settings.
Does the converter work with RSS and Atom feeds?
Yes. RSS 2.0 and Atom 1.0 are both well-supported. The auto-detect logic identifies item and entry elements as the row source. Standard fields like title, link, pubDate, and description all become columns.
What about SOAP or API responses?
Yes. SOAP envelopes, REST API responses wrapped in XML, and arbitrary enterprise formats all parse correctly. The auto-detect logic finds the repeating element regardless of namespace prefix.
Is my XML data private?
Yes. All parsing happens in your browser using JavaScript. Your XML is never transmitted to a server. The page uses HTTPS and runs no third-party tracking scripts during conversion.
What's the maximum file size?
There is no hard size limit. The converter runs entirely in your browser, so the practical limit is your tab's available memory (typically 200 MB to 2 GB). For very large files we recommend Chrome or Edge with a 64-bit browser and closing other tabs.
Can I open the CSV in Excel or Google Sheets?
Yes. The output is a standard CSV file. Double-click to open in Excel, or drag it into a Google Sheets tab. If you used a non-comma delimiter, use Data > From Text/CSV in Excel to pick the right one.
Does the converter preserve XML namespaces?
The default behaviour is to strip namespace prefixes for cleaner column names (so ns:title becomes 'title'). Toggle 'preserve namespaces' in settings if you need the prefix included in column names.

Convert your XML now

Free, fast, and private. No sign-up. Your data never leaves your browser.

Start Converting Read the FAQ