CSV to XML

Convert a CSV table into XML records, with header names as element tags. Runs entirely in your browser, no upload.

XML

About this tool

CSV to XML turns a CSV table into XML records. Each row becomes a record element, and each field becomes <tag>value</tag> using the header name as the tag:

<rows>
  <row>
    <name>Ada</name>
    <age>36</age>
  </row>
</rows>

Privacy

Everything runs in your browser via WebAssembly — your CSV is never uploaded. Also available from the gizza CLI and in chat.

FAQ

My CSV has no header row — what tags do the fields get?

Turn the header toggle off and the fields are emitted as <col1>, <col2>, <col3>… in order. With the toggle on (the default), the first row supplies the tag names and is not emitted as a record itself.

What happens to column names with spaces or leading digits?

They are sanitized into valid XML element names: spaces and other illegal characters become _, and a name starting with a digit gets a _ prefix — so a header like 2024 sales becomes <_2024_sales>. Cell values are separately XML-escaped (&, <, >), so the output is always well-formed.

Can I rename the <rows> and <row> wrapper elements?

Yes — the root tag (default rows) wraps the whole document and the record tag (default row) wraps each CSV line. Set them to e.g. products and product to match the schema your importer expects.

Does it handle semicolon- or tab-separated files?

Yes. The delimiter accepts any single character or the words comma, tab, semicolon, pipe — handy for European-style ; exports or TSV clipboard pastes.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool csv-to-xml "name,age
Ada,36
Bo,40"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/csv-to-xml/?data=name%2Cage%0AAda%2C36%0ABo%2C40&root=rows&row=row&header=true&delimiter=%2C

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.