Home Text Tools Math & Numbers Developer Tools Date & Time Image Tools Blog
XML to TSV Converter

Paste XML Data into Excel or Google Sheets as Tab-Separated Rows

Turn repeated XML records into tab-separated rows that fill spreadsheet columns when pasted, with tips for nested elements and attributes.

A supplier sends an XML export, a legacy system dumps its data as tags, or an API answers with XML. Opening it in a spreadsheet gives a confusing tree or a single column. If the file contains repeated records, they can be turned into rows. The XML to TSV Converter produces tab-separated text that you can paste directly into cell A1.

XML to TSV Converter FREE online toolRuns in your browser. No sign-up, nothing to install. Open the tool

Find the repeating record

Tabular output works when the XML has a repeating element, such as <item> or <order>, with the same child elements in each one. Each repeated element becomes a row, and the child element names become column headers. A file with one product description and no repetition does not map to a table.

Convert and paste

  1. Copy the XML text, or open the file in the converter.
  2. Check that the output shows one row per record and sensible headers.
  3. Copy the tab-separated output.
  4. Click A1 in your spreadsheet and paste; the cells split at each tab automatically.
  5. Format columns that contain IDs or dates as Text before pasting if you need to keep their exact form.
  6. Compare the number of rows with the number of records in the XML.

Attributes and nested elements

Data can sit in attributes, as in <price currency="EUR">, or in nested elements, like an address containing street and city. A flat table cannot show hierarchy, so decide how to handle it. Attributes appear as their own columns, with names starting with @. If nested data is dense, convert it in several passes, one level at a time, or rely on the dotted column names, such as address.city, that the converter builds for nested elements.

Problems you may see

  • Empty elements produce blank cells, which is correct but can hide missing data.
  • Records that do not contain the same elements leave blank cells where a field is missing, so inspect the header row.
  • Text containing line breaks or tabs is converted with spaces in their place, because TSV cannot store them; the converter shows a note when it does this.
  • Large numeric strings may be converted to scientific notation by the spreadsheet.
  • Namespaces, such as ns:item, may appear in the headers and should be cleaned up.

Why tabs work well

Tabs rarely appear inside business text, so they split cleanly where commas would need quoting rules. Spreadsheet applications also treat pasted tabs as column breaks without opening an import wizard, which saves time on repeated tasks. If you need a CSV afterward, you can save the sheet in that format from the spreadsheet itself.

Automating repeated imports

If you receive the same XML structure every week, note the steps and keep one spreadsheet template with the headers already in place. After pasting, formulas on a second sheet can summarize the data without touching the pasted block. When the supplier changes the structure, the header row will tell you straight away, because new or missing columns show up before you build reports on shifted data.

Validate the result

Pick two or three records at random and compare them with the source XML, field by field. Pay special attention to special characters such as ampersands and accents, and to numbers with decimal separators. If your region uses commas as decimals, your spreadsheet may interpret values differently from the source, so verify totals against a figure you trust before using the sheet for decisions or reports.

Try the free XML to TSV Converter
Runs in your browser. No sign-up, nothing to install.

Comments (0)

No comments yet. Be the first to share a thought.