TsWorks Tools
All tools (39)

CSV to XML

Turn a spreadsheet export into well-formed XML.

Delimiter
Indent

Off keeps every value a string, which preserves leading zeros.

Paste CSV or TSV. Quoted fields, embedded commas and newlines are handled.

CSV to XML

Paste a spreadsheet export and get XML. The delimiter is detected from the first line, so files from Excel, Google Sheets and European locales all work without configuration, and the header row supplies the element names for every field.

Element names get rewritten when they have to be

XML names cannot begin with a digit or contain spaces, and spreadsheet headers routinely do both. A column called First Namebecomes First_Name and one called 2024becomes _2024. The rewrite is deterministic rather than clever, which is what makes the result round-trip: run it back throughXML to CSV and the columns line up again.

Quoting is handled properly on the way in

Splitting a CSV line on commas breaks the moment a field contains one. This uses a real RFC 4180 parser, so "Hopper, Grace" stays one field and a newline inside quotes does not start a new record. On the way out, &, < and> are escaped, so a value containing markup cannot break the document.

Root and indentation

Every row becomes an <item> inside the root element you name. Set indentation to minified when the XML is going over the wire rather than into a file - it is the same document without the whitespace.

Related tools