Skip to main content

CSV to XML

Convert CSV to XML online with your own root and row tag names. Invalid element names are fixed and special characters are escaped. Free.

More options

CSV

Stays in your browser

XML

The result appears here after you press Convert.

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Next steps

Done here? Use the Send to… menu on the result to carry it on to XML Formatter or XML to JSON.

Free Online CSV to XML

Turn spreadsheet rows into XML. Choose the tag names for the whole document and for each row; column names become element names. It gives developers a quick browser-based way to solve a focused csv to xml task before moving the result into a project.

How to use CSV to XML

Paste your data into the box on the left, or open a file, then press Convert. The first row gives the element names. Each following row becomes one element with a child element per column.

Common mistakes

  • Column names that start with a digit: XML needs a letter or underscore first, so they get an underscore in front.
  • Leaving the row tag empty: a default of "row" is used.

Frequently asked questions

What if a column name has spaces?
XML names cannot contain spaces or most symbols, so they are replaced with an underscore and the tool tells you which columns changed.
Are special characters escaped?
Yes. &, < and > in your data are written as &amp;, &lt; and &gt;.
What happens to empty cells?
They become an empty element such as <city/>.
Is my data uploaded anywhere?
No. The conversion runs in your browser and nothing you paste or open is sent to a server.
How do I use this csv to xml tool?
Use the interactive controls above; processing stays in your browser and the result is intended as a practical starting point for development work.

More Formatters & Parsers

View all Formatters & Parsers tools →