About this tool
CSV is a flat, row-and-column format; XML is a tree. Converting between them only really works cleanly when the XML represents a list of similar records — the classic case being something like <customers> containing many <customer> elements that each look roughly the same. This tool is built around that case in both directions.
XML → CSV
The converter scans your document for a repeating element — siblings that share the same tag name under the same parent — and uses that as the row. If more than one repeating structure exists in your document, a dropdown lets you pick which one to use as rows. For each row, its attributes become columns prefixed with @ (so an id attribute becomes an @id column), and its child elements become ordinary columns. A child element that's itself nested one level deeper (like an <address> containing <city>) is flattened into a dot-notation column such as address.city.
Not everything flattens cleanly. If a row contains a child element that itself repeats — say a product with several <category> tags — there's no single CSV cell that can represent a list. Rather than silently keeping only the first value, this tool joins the repeated values into one cell with a | separator and calls this out explicitly in the warnings under the result, so you know that column needs a closer look rather than assuming it's complete.
CSV → XML
Each data row becomes one instance of your chosen row element, nested inside your chosen root element. A column header starting with @ (matching the convention this tool itself uses going the other direction) becomes an attribute on the row element instead of a child element — so a round trip through XML → CSV → XML preserves the attribute/element distinction rather than flattening everything into child elements. Column names that aren't valid XML tag names (spaces, a leading digit, stray punctuation) are automatically sanitized, and you'll see a warning if that causes two different columns to collide on the same name.
Delimiters and quoting
Both directions support comma, tab, semicolon, or a custom single/multi-character delimiter. Parsing follows the standard CSV quoting convention: a field containing the delimiter, a double quote, or a line break is wrapped in double quotes, and a literal double quote inside a quoted field is written as two double quotes in a row (""). This tool's own CSV parser and writer both follow this convention, so output from one direction reads back correctly in the other. Everything runs locally in your browser; nothing you paste or upload is sent to a server.