TSV to YAML Converter

Paste TSV, tab-separated values with a header row, and get back a readable YAML sequence, one mapping per row. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-22

Overview

Introduction

Copying a range of cells out of a spreadsheet app and pasting it elsewhere produces tab-separated text automatically, no explicit export step required. This converter turns that pasted TSV, or any tab-separated file with a header row, directly into a YAML sequence of records.

It shares its parsing logic with the CSV to YAML Converter, with the delimiter fixed to a tab, so anything true of that tool's behavior around headers and missing values holds here too.

What Is TSV to YAML Converter?

A TSV-to-YAML converter reads tab-separated rows, treats the first as column headers, and produces a YAML sequence where each following row becomes a mapping keyed by those headers.

It uses the same quote-aware parser as the CSV to YAML Converter, so a field can still contain a literal tab or newline if it's wrapped in quotes.

How TSV to YAML Converter Works

The input is scanned character by character with a tab as the field separator, correctly handling quoted fields that contain the delimiter itself.

The header row's values become the keys used to build one record object per subsequent row, and the resulting array is serialized as block-style YAML.

When To Use TSV to YAML Converter

Use it right after copying a range of cells from a spreadsheet, when you need that data as a YAML fixture or config list.

It's also useful for converting any tab-delimited export, a database dump, a log analysis tool's output, into YAML.

Features

Advantages

  • Runs entirely client-side.
  • Accepts data copied directly from a spreadsheet with no reformatting.
  • Correctly handles quoted fields containing embedded tabs or newlines.
  • Every record gets a consistent set of keys, even with missing trailing values.

Limitations

  • All values become YAML strings; there's no automatic type inference.
  • A file with no header row will misread its first data row as headers.
  • Very large pastes may be slow to parse, since the whole input is processed in memory.

Examples

Pasted spreadsheet cells

Input

id	name
1	Ada
2	Grace

Output

- id: "1"
  name: Ada
- id: "2"
  name: Grace

Each row becomes a mapping using the header row as keys. The id values are quoted since, like all TSV values, they're plain strings.

Best Practices & Notes

Best Practices

  • Paste directly from a spreadsheet selection rather than reformatting it first, tabs are already the expected delimiter.
  • Add explicit types after conversion if your target system needs numbers or booleans.
  • Confirm the first row is really a header before converting, to avoid misreading a data row as column names.

Developer Notes

This is a thin wrapper around the CSV to YAML Converter's `csvToYaml()` function with the delimiter fixed to `"\t"`, so both tools share one parser and stay in sync automatically.

TSV to YAML Converter Use Cases

  • Turning spreadsheet cells copied to the clipboard into a YAML fixture
  • Converting a tab-delimited export into a YAML-based config list
  • Reviewing tab-separated data in a more hierarchical, readable form

Common Mistakes

  • Pasting data without a header row and getting the first record treated as column names.
  • Expecting numeric-looking values to become real YAML numbers automatically.

Tips

  • This is the fastest path from a spreadsheet selection to YAML: copy the cells, paste them in, done.
  • Pair this with the YAML to TSV Converter to round-trip and confirm a conversion.

References

Frequently Asked Questions