Skip to main content
WizTools123
WizTools123
Free Online Tools

Tool Categories


CSV Tools New Tool

Free Online CSV to XML and XML to CSV Converter

Convert CSV into XML and XML back into CSV in your browser. Column headings become valid tag names, because a heading with a space or a leading digit is not a legal tag, and ampersands are escaped properly. Going the other way, repeated records are found automatically and nested paths become column names.

Free Forever Nothing Uploaded Both directions Valid output
Free Online CSV to XML and XML to CSV Converter
Share this tool
Advertisement Slot (Top Banner) Google AdSense Unit • Responsive Banner
Bulk CSV and XML Converter Your file is read inside this tab. Nothing is uploaded anywhere.
Drop CSV or XML files here The direction is worked out from what you drop, and can be set by hand. Choose files Up to 25 MB per file. Nothing is uploaded.
0%
Or paste it
Direction
Reading the file
The XML
Details
Reading the XML
Writing the result

0 files 0 records 0 fields 0 tag names adjusted

The data as read
Nothing to show yet.
Result
0 characters 0 lines
Buy Us A Coffee

Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.

Buy Us A Coffee
Sponsored Content (Below Tool) Google AdSense Placement

How to Convert CSV to XML

A few steps, and nothing is uploaded.

1
Drop the file in A CSV or an XML file. The direction is worked out from the content, and can be set by hand if the guess is wrong.
2
Name the tags, going to XML An outer tag and a tag for each row. Headings become the field tags, adjusted where they would not be legal.
3
Choose elements or attributes Elements are the usual choice. Attributes make a more compact file, and some systems insist on one or the other.
4
Copy or download Several files can be converted in one pass and downloaded together as a zip.

What to Know About CSV and XML

Tag names, escaping, and why not every XML becomes a table.

A column heading is often not a legal tag name. Tags cannot contain spaces, cannot start with a digit, and must not start with the letters xml in any case. "Order ID" becomes Order_ID and "2026 total" becomes _2026_total. The count of adjusted names is shown, because a renamed field is something the receiving system needs to know about.
Escaping is the other thing that breaks hand made XML. A single ampersand in a company name makes the whole document fail to parse. Ampersands and angle brackets are escaped properly, and CDATA is offered for the cases where a receiving system prefers it.
Not every XML document can become a table, and that is a real limit. CSV is a grid; XML is a tree. A document whose records all have the same simple fields converts cleanly. One with deep nesting, repeated child elements inside a record, or mixed content does not have a single correct flat form, and anything that claims otherwise is making a choice on your behalf.
Repeated records are found by looking for the deepest repeating siblings. That is usually right, and the menu lets you pick a different element when it is not. Picking the wrong one is obvious immediately, because the table comes out with one row or with far too many columns.
Nesting becomes a path in the column name. A city inside an address element becomes a column called address/city, which keeps the information and stays readable. Repeated children at the same level cannot be flattened this way and are joined into one value rather than being dropped.
Attributes and elements are kept apart. An attribute called id on a record becomes a column named @id, so you can tell which was which if the file ever has to go back the other way.

Key Features & Capabilities

What this tool does, and what it deliberately does not.

Both directions CSV into XML and XML into CSV, with the direction detected from the file.
Output that parses Legal tag names and correct escaping, so the result loads instead of failing on an ampersand.
Elements or attributes Three shapes, because receiving systems disagree about which they want.
Nesting flattened A nested field becomes address/city, and attributes become @id, so nothing is silently lost.
A folder at a time Convert a whole batch in one pass and take the results away as a zip.
Nothing is uploaded Both directions run inside this tab, so order data never leaves your computer.

About the CSV and XML Converter

XML refuses to go away, because the systems that insisted on it are the systems nobody is allowed to replace: banks, government filings, logistics, older enterprise software. So the job of turning a spreadsheet export into XML, and of turning somebody XML feed back into something a spreadsheet can read, keeps coming up long after the format stopped being fashionable.

Going from CSV to XML looks trivial and has two traps that both produce a file which will not parse. The first is tag names: a heading like "Order ID" or "2026 total" is perfectly normal in a spreadsheet and illegal as a tag, so it has to be adjusted, and you need to know it was. The second is escaping: one ampersand in "Hodges & Sons" is enough to make the entire document invalid, and the error the receiving system reports will point at a line number rather than at the ampersand.

Coming back the other way, the honest answer is that it depends on the document. CSV is a grid and XML is a tree, so only some trees have a sensible flat form. Records with the same simple fields convert perfectly. Deeply nested documents with repeated children inside each record do not, and a converter that produces a confident looking table from one of those has quietly decided something for you. Flattening nested paths into column names handles most real feeds and stops short of pretending about the rest.

Frequently Asked Questions

Tag names, attributes, nesting and what cannot convert.

Because it was not a legal tag name. Tags cannot contain spaces or start with a digit, and must not begin with xml. The adjusted count under the options tells you how many were changed so you can check them against what the receiving system expects.

Elements unless you have been told otherwise. They cope with longer values and with characters that are awkward in attributes. Attributes make a smaller file and some older systems require them.

Nested paths become column names, so a city inside an address becomes a column called address/city. Attributes become columns named with an @ in front, so you can still tell them apart.

The wrong element was chosen as the record. The menu lists the candidates; pick the element that repeats once per record. One row usually means the outer element was picked instead.

No, and it is worth saying plainly. A document with repeated child elements inside each record, or with mixed text and elements, has no single correct flat form. Those are joined into one value rather than invented into extra rows.

It wraps a value so that the characters inside it are not interpreted, instead of escaping them one by one. The result is equivalent for a correct parser, but some systems specifically expect it.

Every Other CSV Tool

16 more tools in this set. All free, all in your browser.

Advertisement Slot (Bottom Banner) Google AdSense Unit • Responsive Banner