Convert

CSV to XML Converter

Turn a table into XML for an import, feed or integration. Each row becomes a row element and each column a child element, with every value escaped correctly. No DTDs, entities or processing instructions are ever written. Everything is processed in your browser; your data is not uploaded.

Back

1. Data and XML structure

Local only

Processed in your browser; your files and data are not uploaded or stored. Formulas, macros and scripts in your data are never run.

2. XML output

Live preview

The output never contains a DTD, entity declarations or processing instructions; only the standard XML declaration is written, and you can turn it off. Every generated document is checked by the browser's XML parser before it is offered.

Data is processed in your browser's memory. Limits: 20 MB per file, 200,000 rows, 1,000 columns and 3,000,000 cells.

About this tool

About CSV to XML Converter

CSV to XML Converter turns a CSV or TSV table into well-formed XML. Each row becomes a row element and each column a child element, using your choice of root and row element names, with headers made into safe XML names and every value escaped.

Many integrations, feeds and legacy systems still expect XML. Hand-writing it means escaping ampersands and angle brackets and fixing headers with spaces. This tool does both reliably, keeps original header names when it has to change them, and never writes DTDs, entities or processing instructions.

How to use

Step by step

  1. Upload or paste the table.
  2. Enter the root element and row element names.
  3. Choose header-named elements or field elements with a name attribute.
  4. Decide about the XML declaration and empty cells.
  5. Review the XML text, then download or copy it.
Key features

What it offers

  • Custom root and row element names with validation
  • Safe normalisation of invalid header names
  • Original header kept in a name attribute when changed
  • Full escaping of &, < and > and quotes in attributes
  • No DTD, entities or processing instructions
  • Self-check of the generated XML before download
Best practices

Tips for best results

  • Use short, simple headers that are already valid XML names.
  • Choose field elements when headers contain many spaces or symbols.
  • Keep the XML declaration for systems that expect it.
  • Validate the XML against the receiving system's schema.
Benefits

Why people use it

Well-formed

Every file passes an XML parser check.

Safe

No DTDs, entities or processing instructions.

Private

Converted locally in your browser.

FAQ

Common questions

The root element (default <rows>) contains one row element (default <row>) per data row, and each column becomes a child element named after its header, for example <city>Pune</city>.
XML element names cannot contain spaces, start with a digit, or start with "xml". Such headers are normalised (spaces and invalid characters become underscores, and an underscore is added in front where needed) and the original header is kept in a name="…" attribute. You can also choose <field name="Header"> elements for every column.
Every value is escaped: & becomes &amp;, < becomes &lt;, > becomes &gt;, and quotes are escaped inside attributes. Unicode text, Hindi and emoji are written as-is in UTF-8. Control characters that XML 1.0 does not allow are removed, and the page reports how many.
No. The tool never writes a DOCTYPE, entity declarations or processing instructions. The only line before the root is the optional XML declaration <?xml version="1.0" encoding="UTF-8"?>.
As empty elements such as <phone/> by default. Untick the option to leave empty cells out of their row.
Yes. The text shown in the XML box is exactly what is downloaded and copied.
No. The XML is created in your browser and nothing is stored.
Private by design

This runs entirely in your browser

No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.

Install Toolisco Add it to your device for offline, one-tap access.