What this tool does
Each CSV row becomes a row element inside a rows document, and each column becomes a child element named after its header. Values are escaped as XML requires: an ampersand becomes &, the angle brackets become < and >.
You can choose the indentation, whether types are detected, and whether the XML declaration is written at the top.
Column names are not free
An XML element name has rules, and a spreadsheet header does not. A name cannot contain a space, cannot start with a digit, and cannot contain most punctuation — all of which are ordinary in an exported header row.
So header names are adjusted rather than copied:
- a forbidden character becomes an underscore:
first namegivesfirst_name,a+bgivesa_b; - a name starting with something XML will not accept is prefixed, not truncated:
2colgives_2col, so you can still tell which column it was; - letters XML does allow are left alone, including accented and CJK ones —
caféand日本語pass through unchanged.
The alternative would be to emit the header verbatim and hand you a file that looks converted and fails at the first parse. That failure appears far from its cause, which is what makes it expensive.
Duplicate headers
Two columns with the same name are separated before they reach the XML: the second becomes a_1. No column is silently merged into another. The same applies when two different headers reduce to the same name: user id and user_id both give user_id, so the second becomes user_id_1. Without that, one of the two columns would vanish from the document, value included.
Private by design
Everything runs locally in your browser with JavaScript. Your data is never uploaded, which makes the tool safe for sensitive content, and it keeps working offline.