Some integrations, SOAP services, sitemap generators and older ERPs only accept XML. This tool wraps each CSV row in a record element and each column in a child element named after the header, producing a well-formed XML document with an XML declaration and UTF-8 encoding.
Paste the CSV, set the root and record tag names, click Convert and copy or download the XML. The document is built in your browser with no upload, so the data stays with you.
How to use CSV to XML step by step
Paste the comma-separated CSV into the left box. The first line provides the element names.
Set the root tag (data by default) and the record tag (record by default) to match what the receiving system expects.
Click "Convert to XML". The result appears on the right, indented with two spaces.
Use "Copy" to grab the XML or "Download" to save it as data.xml.
100% free and online: no payments, no software or extensions to install.
Privacy-first: processing happens in your browser, your data never leaves your device.
No sign-up: paste your data and get the result in one click.
Fast and reliable: handle small or large files in seconds, ready for Excel and other tools.
Common use cases
Build a product feed in XML for a marketplace or a price comparison site from a CSV catalogue.
Generate the request body for a SOAP or legacy web service from tabular data.
Create test XML documents for an XSLT or a parser from a few CSV rows.
Convert an inventory list into the XML format expected by an accounting or warehouse system.
Limits and tips
Header names are cleaned to letters, digits and underscores so they become valid element names: "unit price" turns into <unitprice>. A header starting with a digit still produces an invalid tag; rename it first.
The characters < > & ' " inside values are escaped as XML entities, so the output is always well-formed.
The parser splits on commas only and ignores quotes, so values containing commas will shift into the next element.
All values are written as text nodes; there are no attributes and no type annotations.
Frequently asked questions
Can I change the element names?
Yes for the root and the record elements, through the two inputs above the converter. The field elements always take their names from the CSV header, cleaned of characters that are not allowed in XML names.
What is the difference between CSV and XML?
CSV is a minimal, flat text format: rows of values separated by commas, no metadata, no nesting. XML is a markup language where every value is wrapped in named tags, supports hierarchy, attributes and schema validation, and is verbose but self-describing. Systems that need structure and validation ask for XML.
Why is my XML rejected by the receiving system?
Usually because the element names do not match the expected schema (for example <item> instead of <record>, or a required namespace), or because a header contained characters that were stripped. Adjust the root and record tags here and rename the CSV headers to the exact element names required.
Does the tool add a namespace or a schema reference?
No. The output is plain XML with an XML declaration only. If the destination requires an xmlns attribute or an xsi:schemaLocation, add it to the root element after downloading.
Is the CSV uploaded?
No. The XML string is assembled by JavaScript in your browser and offered as a local download. No data is sent to any server.
Related tools
Other free utilities you may find useful
XML to CSV — Transform data from XML format to CSV.
CSV to Excel — Convert a CSV file into a real Excel workbook (.xlsx) with separated columns and leading zeros preserved.
CSV to Delimited — Change the delimiter of your CSV (commas, semicolons, tabs).