ToolLineup

TSV to XML Converter

This TSV to XML converter turns tab-separated text into a well-formed XML document: each line becomes one element and each column becomes a child element named after its header. Column names that are not valid XML element names — ones containing spaces, slashes or a leading digit — are rewritten with underscores, so the result always parses rather than failing in whatever consumes it. You can rename the wrapper and row elements to match the schema you are feeding, and text content is escaped so ampersands and angle brackets in your data cannot break the document. Everything runs in your browser.

How it works

Each line becomes one element, and each column becomes a child element named after its header. Column names that are not valid XML names — ones with spaces or a leading digit — are rewritten with underscores so the output always parses.

Rename the wrapper and row elements below to match whatever schema you are feeding.

The conversion runs entirely in your browser — nothing you paste or upload is sent to a server.

TSV input
Paste tab-separated text or upload a .tsv file…
XML output

How to convert TSV to XML

  1. Paste tab-separated text into the input on the left, or upload a .tsv file.
  2. Set the wrapper and row element names to match the schema you are feeding.
  3. Copy the XML on the right, or download it as an .xml file.

How the document is shaped

XML needs exactly one root element, and a table has no natural one, so the rows are wrapped in a container you name yourself — rows by default. Inside it, each line becomes one element (row by default), and each column becomes a child element named after its heading.

Column names that XML will not accept

XML element names are stricter than spreadsheet headings. They cannot contain spaces, slashes or most punctuation, and they cannot begin with a digit. A heading like Order Total (USD) or 2026 Forecast would produce a document that fails to parse.

Rather than emitting broken XML, invalid characters are replaced with underscores and a leading digit gets an underscore prefix. The output always parses, and the repair is predictable enough to map back to the original heading if you need to.

Escaping

Ampersands, angle brackets and quotes inside your values are escaped as entities, so a cell containing R&D or <draft> is stored as text rather than being read as markup.

Common use cases

  • Preparing an import file for a system that only accepts XML.
  • Turning a spreadsheet of records into a SOAP request body.
  • Generating test fixtures for an XML-based integration.

Frequently asked questions

How do I convert TSV to XML?

Paste your tab-separated text into the left panel or upload a .tsv file. The XML document appears on the right, ready to copy or download.

What do the elements get named?

The wrapper element and the per-row element are both yours to set — they default to rows and row. Inside each row, the child elements take their names from your header line.

What if a column heading is not a valid XML name?

It is rewritten. Spaces and other invalid characters become underscores, and a heading starting with a digit gets an underscore prefix, because XML names cannot begin with a number.

Are special characters escaped?

Yes. Ampersands, angle brackets and quotes in your data are escaped, so no value can accidentally break the markup.

Can I turn off type detection?

Yes, though it makes little difference here — XML text content is untyped anyway. It is available for consistency with the other converters.

Is my data sent to a server?

No. The conversion happens in your browser and nothing you paste leaves your device.

Related tools