Convert TSV to XML Online
Convert TSV files to XML directly in your browser. Download a structured XML document with one element per row — no upload required.
About converting TSV to XML
TSV to XML is less common than TSV to JSON, but it has steady users. Public sequence archives such as ENA accept sample and run metadata as XML, laboratory information systems exchange XML, and older enterprise middleware consumes XML while upstream tools emit tab-delimited text. In each case, a table produced by an analysis or a LIMS export has to be wrapped in elements before the receiving system will accept it.
The converter produces a neutral structure: a <data> root, a <row> per TSV line and one child element per column, with every value as text. That is a clean starting point for an XSLT or a script that maps the records onto a target schema, such as an archive's sample XML layout. It will not match that schema by itself.
Headers from scientific tools often contain characters XML does not allow in element names. #CHROM becomes _CHROM, p-value becomes p_value, log2(FC) becomes log2_FC_, and a column named 5prime becomes _5prime. Headerless files give elements named column0, column1 and so on. Rename the columns before converting if the element names need to be meaningful.
Worked example
A small sample file, converted with the default settings.
Input (TSV)
symbol chrom description tpm detected
TP53 chr17 tumor protein p53 24.7 true
BRCA1 chr17 BRCA1 DNA repair associated 8.13 true
NT5C chr17 5', 3'-nucleotidase, cytosolic 3.4 true
SREBF2 chr22 sterol regulatory element binding transcription factor 2 falseOutput (XML)
<?xml version="1.0" encoding="UTF-8"?>
<data>
<row>
<symbol>TP53</symbol>
<chrom>chr17</chrom>
<description>tumor protein p53</description>
<tpm>24.7</tpm>
<detected>true</detected>
</row>
<row>
<symbol>BRCA1</symbol>
<chrom>chr17</chrom>
<description>BRCA1 DNA repair associated</description>
<tpm>8.13</tpm>
<detected>true</detected>
</row>
<row>
<symbol>NT5C</symbol>
<chrom>chr17</chrom>
<description>5', 3'-nucleotidase, cytosolic</description>
<tpm>3.4</tpm>
<detected>true</detected>
</row>
<row>
<symbol>SREBF2</symbol>
<chrom>chr22</chrom>
<description>sterol regulatory element binding transcription factor 2</description>
<tpm></tpm>
<detected>false</detected>
</row>
</data>What changes when you convert TSV to XML
- The document starts with an XML declaration and has a single <data> root.
- Each TSV line becomes a <row> with child elements <symbol>, <chrom>, <description>, <tpm> and <detected>.
- NT5C's apostrophes are escaped as ', so its description reads 5', 3'-nucleotidase, cytosolic.
- SREBF2's missing tpm becomes an empty <tpm></tpm> element.
- Numbers and booleans are plain text (<tpm>24.7</tpm>, <detected>true</detected>). Any typing has to come from a schema or the program that reads the file.
Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.
Frequently Asked Questions
Why does my #CHROM column appear as <_CHROM>?
XML names cannot contain #. Every character other than an ASCII letter, digit or underscore is replaced with an underscore, and a name that starts with a digit gets a leading underscore. Rename the header in the TSV if you need a specific element name.
Is XML a good output for a large TSV?
It works, but XML is verbose. Every value is wrapped in an opening and a closing tag, so the file is often several times the size of the TSV. For large tables, keep the data in TSV or Parquet and generate XML only for the records a system actually needs.
Can I read the XML back into a table?
Yes. The structure is one level deep, so most XML tools flatten it easily. In Python, pandas.read_xml("genes.xml") returns one row per <row> element and infers the column types from the text again.
Related Tools
TSV Viewer Online
View and inspect TSV files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.
Convert TSV to CSV Online
Convert TSV files to CSV format directly in your browser. No upload required — your data never leaves your device.
Convert TSV to Parquet Online
Convert TSV files to Parquet format directly in your browser. No upload required — your data never leaves your device.
Convert TSV to Excel Online
Convert TSV files to Excel format directly in your browser. No upload required — your data never leaves your device.
Convert TSV to JSON Online
Convert TSV files to JSON format directly in your browser. No upload required — your data never leaves your device.