DevSwitch.net
Back to Tools
⇄

YAML to TSV Converter

Convert YAML data to Tab-Separated Values (TSV) format

File Converters

Tip: Paste your YAML data. If it's an array of objects, the keys will be used as TSV headers.

Runs in your browser

Input YAML

Convert YAML to TSV in your browser

Paste YAML, open a .yaml or .yml file or drop it on the input window, and the tab-separated table appears as you type. Each list item is a line, and a tab separates the columns. Download saves a .tsv file.

TSV is the quickest way to get YAML into a spreadsheet: click Copy, select the first cell of an empty sheet in Excel or Google Sheets and paste, and each value lands in its own column.

YAML to TSV example

Real output for a config with two services. Each service is a line, the nested keys get their own columns, and missing values are left blank between the tabs:

services.yaml
- name: api
  image: nginx:1.27
  ports:
    - 8080
    - 8443
  env:
    LOG_LEVEL: info
- name: worker
  image: node:22
  replicas: 3
  env:
    LOG_LEVEL: debug
services.tsv
name	image	ports.0	ports.1	env.LOG_LEVEL	replicas
api	nginx:1.27	8080	8443	info	
worker	node:22			debug	3

From YAML keys to TSV columns

  1. Read the YAML

    js-yaml loads the input with the YAML 1.2 rules, so numbers, booleans and null are recognised and anchors are resolved. A syntax error stops here and shows its line and column.

  2. Pick the rows

    A top-level list gives one row per item, also when the list sits under a single top-level key. A single mapping gives one row, and a list of plain values one column named value.

  3. Flatten and write

    Nested keys become columns like env.LOG_LEVEL, list entries like ports.0. A missing key or a null leaves the cell empty. Only a value with a tab, a double quote or a line break gets quotes.

Need YAML from a TSV file?

The TSV to YAML converter turns each line into a list item, with the header names as keys.

YAML to TSV questions

Click Open file and choose the .yaml or .yml file, or drop it on the input window. The table is built at once; Download saves it as a .tsv file.

Commas mean nothing in TSV, only tabs separate columns, so Portland, OR is written as it is. Quotes appear only around a tab, a double quote or a line break.

A | block keeps its line breaks, so the cell is put in double quotes and a spreadsheet reads it as one cell with several lines. For a one-line cell, write >- instead: it joins the lines with spaces and drops the final line break.

No. More than one document separated by --- shows an error. Convert one document at a time and paste the tables together.

No. Converting runs in your browser, and an opened file is read there too.