Skip to main content
PulsarKit

Convert XML to CSV

Turn a feed, a product export or an RSS file into a spreadsheet table. The repeating record element is found for you, no XPath required.

Drop your files here

.xml, .rss, .xhtml, .txt · up to 300 MB

More settings

How to Convert to CSV

  1. 1

    Drop your XML file

    Drag an .xml or .rss file onto the page. It is validated first, so a missing closing tag is reported with its line and column instead of half a table.

  2. 2

    Confirm the record element

    The repeating element is detected and shown with how many records it holds, such as rss.channel.item with forty. Pick a different candidate if that is not the level you wanted.

  3. 3

    Convert and download the CSV

    Press the button and save the table.

XML has no rows, so the rows are found

A tree does not tell you which level is a record. The document is walked to a depth of six, counting how many same-named siblings sit at each path, and the largest group wins, with deeper paths breaking a tie, because rss.channel.item is more useful than rss.channel. Up to five candidates are offered with their record counts.

Attributes, nesting and repeated children

An attribute becomes its own column prefixed with @, so id on a product does not collide with a child element of the same name. Child elements turn into dot-named columns down to the depth you allow, and anything deeper is written into one cell as JSON. Repeated children can be joined, numbered or kept as JSON.

Namespaces and hostile documents

Namespace prefixes are stripped by default, so dc:title arrives as a plain title column and a feed mixing three vocabularies still produces readable headers. Documents declaring custom entities in their DOCTYPE are rejected before parsing rather than expanded; that is the class of file that hangs a browser tab.

Nothing is uploaded to convert it

The validator, the parser and the CSV writer are all JavaScript running in this browser tab. No part of your document is sent to a server, stored or logged, and the tool keeps working with the network switched off. Close the tab and nothing of the file remains.

Frequently asked questions

How does the tool decide which element is a record?

It counts repeats. Every path down to depth six is examined for same-named sibling elements, and the path with the most of them becomes the record; if two paths tie, the deeper one wins. The alternatives stay visible with their counts, and you can also type a path yourself when the document is unusual.

Where do XML attributes end up?

Each attribute becomes a column named with an @ prefix, so an id attribute is @id and stays distinct from an id child element. If your export carries attributes you do not need, switching attributes to skip drops them all and leaves a narrower table.

What happens to elements nested inside a record?

They become dot-named columns such as price.currency, down to the depth limit you set. Below that limit the whole subtree is written into a single cell as JSON, which keeps the data available without producing thousands of near-empty columns.

Why does the CSV start with a byte order mark?

So Excel recognises the file as UTF-8 on a double click instead of guessing a legacy code page and mangling accented or Cyrillic text. If the file is destined for a script or a database loader that dislikes the marker, plain UTF-8 is one setting away.

Excel shows everything in one column. What went wrong?

Nothing in the file. Excel splits on the separator from your system locale, which is the semicolon in much of Europe. Convert again with semicolon selected, or use Data then Text to Columns on the file you already have.

Does this work on an RSS or Atom feed?

Yes, that is the easiest case. Detection lands on rss.channel.item or the equivalent entry element on its own, each item becomes a row, and namespaced extensions such as Dublin Core or media tags arrive as ordinary columns once prefixes are stripped.

Why did a quote appear before a value starting with an equals sign?

Because a spreadsheet would otherwise treat it as a formula, and a value from an untrusted feed can be crafted to run a command when the file is opened. A leading apostrophe neutralises it. Plain negative numbers such as -5 are left untouched.

My file has a DOCTYPE and it was refused. Why?

A DOCTYPE that declares entities is refused on purpose. Nested entity definitions can expand into gigabytes of text and freeze the tab, and external ones can reach for files elsewhere. Remove the entity declarations from the DOCTYPE and the document converts normally.

Related tools