All Tools View Categories About Contact Privacy

Transform YAML into TSV

Quickly convert YAML format to TSV format.

Processing happens in this browser. The tool does not send your input to a conversion API.

About Transform YAML into TSV

YAML-to-TSV follows the same data-shape logic as a table export, but uses tab characters between fields rather than commas. TSV is especially convenient when values themselves frequently contain commas, because commas do not need to be quoted simply to preserve their meaning. The tool parses the YAML first and then builds a predictable table from supported structures: a top-level array of objects becomes records, a mapping containing an array of objects uses that array, and other objects are flattened into path/value rows.

The difference between CSV and TSV is small at a glance but useful in practical workflows. Spreadsheet programs, Unix tools, copy-paste operations, and simple line-oriented scripts often handle tab-separated text well. A YAML record such as a service with a description containing commas remains easy to read because commas are treated as ordinary content. Newlines and quotes still need care, so the export quotes fields when required and doubles internal quotes.

When the YAML is already tabular, each unique property name across the objects becomes a column. Suppose one service has name, owner, and port while another has name and owner only. The resulting TSV contains all three columns, leaving the missing port cell empty on the second row. Nested objects and arrays are preserved inside cells as JSON text rather than being silently removed. That makes the flattening rule explicit and gives downstream tools something concrete to inspect.

For non-tabular YAML, path/value mode is intentionally conservative. Instead of inventing a hierarchy of columns, the tool emits a path column such as server.host and a value column. This can be particularly useful for audits, configuration inventories, and spreadsheets where a long list of setting/value pairs is more useful than a visually flattened but ambiguous table.

Load Sample demonstrates both a normal record set and nested metadata. Process generates the TSV only after successful parsing. An empty editor, malformed indentation, or an invalid inline collection produces a visible error and leaves the input intact. Statistics report rows, columns, and output characters. These small checks are useful when a conversion is feeding a spreadsheet or shell command and you want to verify that the expected amount of data came out.

The result can be copied directly or downloaded as a .tsv file. Download uses a browser-created Blob, so there is no upload queue or server-side conversion step. Clear resets the output and status state. The controls are deliberately simple because the important choice is the YAML structure, not a large collection of formatting switches.

As with CSV, TSV cannot retain YAML comments, anchors, tags, document directives, or arbitrary nesting as native table features. It is better thought of as an export view of the parsed data. If you need a reversible representation, JSON or the original YAML is the appropriate destination. TSV becomes valuable when a person or program needs rows and columns rather than a hierarchy.

For learning and troubleshooting, compare the YAML structure with the produced header row. If the header list feels surprising, inspect whether your YAML root is a mapping containing one list, a list of heterogeneous records, or a general nested configuration. That decision explains the output shape. Understanding the distinction is more useful than memorising a conversion command because it applies to spreadsheet exports in many data formats.

Everything runs locally in the browser. That keeps the workflow convenient for internal configuration snippets without requiring a public upload service. Browser memory and parsing time remain the practical limits for very large documents, but typical configuration datasets are lightweight. The final TSV is intentionally plain text, making it easy to inspect in a text editor as well as in spreadsheet software.

TSV is also a practical interchange format for command-line workflows because tabs are visually unobtrusive in many tools. When debugging an import, inspect the raw text rather than relying only on how a spreadsheet displays it; spreadsheets may infer dates, numbers, or booleans on their own. The converter does not make those spreadsheet decisions. It emits text fields based on the parsed YAML values, leaving type interpretation to the program that consumes the TSV. If a receiving script expects every row to have exactly the same number of fields, inspect heterogeneous records before import and confirm that your downstream parser treats empty cells as missing values rather than malformed rows.

Features

  • Tabular object arrays: Converts record arrays into rows and derives columns from their keys.
  • Nested array discovery: Uses a child array of objects when a root mapping contains one.
  • Path/value fallback: Provides an explicit flattened view for general nested YAML.
  • Tab-safe fields: Uses tabs as separators while quoting fields that contain newlines or quotes.
  • Nested cell preservation: Represents nested values as JSON text inside a table cell.
  • Sample dataset: Demonstrates services, owners, descriptions, and optional ports.
  • Row and column stats: Shows table dimensions and output character count.
  • Copy output: Copies TSV text for spreadsheet or script workflows.
  • Download TSV: Saves the result as a standard `.tsv` file.
  • Offline-friendly processing: Runs the transformation directly in the browser.

How to Use

  1. Paste YAML records or a configuration containing a record list.
  2. Click Load Sample to see a TSV-friendly example with commas inside a description.
  3. Click Transform to TSV to generate tab-separated rows.
  4. Inspect the header and row alignment in the output area.
  5. Use the statistics to confirm the detected table dimensions.
  6. Copy the TSV for a spreadsheet or shell workflow, or download it as a file.

Examples

Example 1 — Service table. Each object in a YAML list becomes one tab-separated row.

name	owner	port
api	platform	8080

Example 2 — Comma-friendly values. Commas can remain ordinary characters because the separator is a tab.

name	description
api	Public API, version 2

Example 3 — Nested data. Nested metadata is represented as JSON text in a cell.

name	metadata
api	{"tier":"backend"}

Example 4 — Path/value fallback. A general nested mapping becomes path/value rows.

path	value
server.host	localhost

Example 5 — Missing fields. Rows with no port still keep their column position.

name	owner	port
web	frontend	

Benefits

  • Spreadsheet friendly: TSV pastes cleanly into many spreadsheet and table editors.
  • Comma tolerance: Comma-rich text does not need comma-based field separation.
  • Simple plain text: The output is easy to inspect in a terminal or text editor.
  • Predictable columns: Record keys determine a stable header set.
  • Nested preservation: Complex values remain visible as JSON cell text.
  • Local processing: No upload endpoint is required.

Frequently Asked Questions

Why use TSV instead of CSV?
TSV can be convenient when your values frequently contain commas, because tabs remain the primary separators.
What YAML shapes are supported?
Record arrays are the best fit; general mappings use path/value rows.
Are nested objects lost?
No. They are represented as JSON text inside a cell.
How are tabs handled?
Tabs act as delimiters, while fields containing newlines or quotes are quoted when necessary.
Are comments preserved?
No. Comments are not part of the parsed data model.
Can I import the result into a spreadsheet?
Yes. Most spreadsheet applications can import or paste tab-separated text.
Is TSV reversible to the original YAML?
No. The export is a flat table representation.
Does processing leave the browser?
No external conversion request is used.
Can I download a .tsv file?
Yes. The Download button creates one locally.