---
title: "CSV to XML Converter: Columns to Nested XML, Free"
description: "Free CSV to XML converter: customer.name nests, @id becomes an attribute, every header a valid XML name. Files up to 100 MB, converted in your browser."
canonical: "https://browser-use.com/tools/csv-to-xml"
last_updated: "2026-11-18"
---

# CSV to XML Converter: Columns to Nested XML, Free

## CSV to XML Converter

Convert CSV to XML in your browser. Headers like customer.name become nested tags, order@id an attribute, and any header a valid XML name.

## How it works

### Paste CSV

Paste CSV, open a file up to 100 MB, or drop one on the box. Comma, semicolon, tab or pipe is detected. Nothing is uploaded.

### Check the names

Set the root and row elements if you want. Headers that are not XML names are renamed and listed.

### Copy or download

Copy the XML or download it as an .xml file.

### How do headers become XML?

Dots nest: customer.address.city is a city element inside address inside customer. @id and order@id are attributes of the row, customer.@type an attribute of customer. tag.0 and tag.1 are two tag elements. These are the columns XML to CSV writes, so a file can usually go to CSV and back (set the row name if it is not found). Turn off "Nest on . and @" to keep one element per column.

### Which headers are renamed?

An XML name starts with a letter or \_ and holds no spaces, so first name becomes first\_name and 2nd phone becomes \_2nd\_phone. An empty header becomes column\_N, a duplicate gets \_2. Emoji are replaced and letters stay, though Python's expat (to 2.10) also refuses some newer letters, like Sinhala or Khmer. Every change is listed.

Source: [XML 1.0 §2.3 Names](https://www.w3.org/TR/xml/#NT-Name) · [libexpat #171](https://github.com/libexpat/libexpat/issues/171)

### What happens to & < > and control characters?

& < > are escaped, or kept as written inside CDATA if you pick it (a \]\]> in a cell splits the section). Control characters XML 1.0 does not allow, like U+0007, are removed and counted, so no illegal character is written.

Source: [§2.2 Characters](https://www.w3.org/TR/xml/#charsets) · [§2.7 CDATA](https://www.w3.org/TR/xml/#sec-cdata-sect)

### Which CSV can it read?

Quoted fields can hold the delimiter, line breaks and "" for a quote. CRLF or LF, a UTF-8 byte order mark and a final line break are all fine. Rows with fewer or more cells than the header are converted and listed.

Source: [RFC 4180](https://www.rfc-editor.org/rfc/rfc4180)

## Need data from a website first?

Browser Use agents open pages in a real browser, including dynamic ones, and return structured data.

[See AI web scraping](https://browser-use.com/web-scraping)

2 rows converted to XML

CSVorder@id,date,customer.name,customer.phone,customer.email,tag.0,tag.1,note 1001,2026-11-02,Ada Park,555-0100,,gift,express,"Leave at the door, ring ""twice""" 1002,2026-11-03,Lin Wu,,lin@example.com,repeat,,Call before 9:00

Load exampleOpen .csv file

Runs in your browser, files up to 100 MB. Your CSV is never uploaded.

CSV · comma · 2 rows · 8 columns · 224 B

Root element

Empty: rows.

Row element

Empty: order, from the order@id column.

DelimiterAuto (comma)CommaSemicolonTabPipeFirst row is the headerNest on . and @

customer.name nests, order@id is an attribute, tag.0 and tag.1 repeat, as [XML to CSV](https://browser-use.com/tools/xml-to-csv) writes them.

Empty cells

Leave outEmpty tag

Indent

2 spaces4 spacesOne line

Text as CDATAXML declaration

Quoting follows [RFC 4180](https://www.rfc-editor.org/rfc/rfc4180). Headers that are not [XML names](https://www.w3.org/TR/xml/#NT-Name) are renamed and listed.

## XML · 2 rows · 503 B

Copy XMLDownload .xml

<?xml version="1.0" encoding="UTF-8"?>
<rows>
  <order id="1001">
    <date>2026-11-02</date>
    <customer>
      <name>Ada Park</name>
      <phone>555-0100</phone>
    </customer>
    <tag>gift</tag>
    <tag>express</tag>
    <note>Leave at the door, ring "twice"</note>
  </order>
  <order id="1002">
    <date>2026-11-03</date>
    <customer>
      <name>Lin Wu</name>
      <email>lin@example.com</email>
    </customer>
    <tag>repeat</tag>
    <note>Call before 9:00</note>
  </order>
</rows>

---

BROWSER USE

- Browser Use Agents: give Browser Use a task and receive completed work. API V4 is current for new integrations.
- Browser Infrastructure: connect your agent or automation to managed browsers through SDK, REST, or CDP. Starts at $0.06/browser-hour.
- Developer tools: Open Source, Browser Harness, SDK, and MCP support the two products above.

[Developer Index](https://browser-use.com/index.md)
[Product Map](https://browser-use.com/llms.txt)
[Full Product Context](https://browser-use.com/llms-full.txt)
[Pricing](https://browser-use.com/pricing.md)
[Cloud Docs](https://docs.browser-use.com/cloud/quickstart)
[Open Source Docs](https://docs.browser-use.com/open-source/introduction)
