# CLI Table Converter Guide

Turn aligned terminal output such as docker ps or df into a Markdown table, CSV or TSV.

- Tool: https://ilham.dev/tools/cli-table-converter/
- Guide URL: https://ilham.dev/guides/cli-table-converter/
- Tool guides index: https://ilham.dev/guides/tools/
- Broader guide: Working With Structured Data (https://ilham.dev/guides/working-with-structured-data/)

## What it does

Turn the columns printed by docker ps, ps, df or kubectl into a table you can paste into a document or a ticket. The separator is detected from the text, and the output can be a Markdown table, CSV or TSV. Rows of different lengths are padded so the result is always rectangular.

## Use the tool

Open https://ilham.dev/tools/cli-table-converter/, add the input the tool asks for, run it, and check the output before using it elsewhere.

## Input and output

- Input: text.
- Output: text.
- Category: Convert.

## Privacy and processing
Processing happens locally in your browser. This tool does not upload the input to ilham.dev.

## Questions

### Why does the automatic mode choose two spaces?

In aligned terminal output a single space can appear inside a value, while two or more spaces are the gap between columns. Splitting on two spaces keeps names with one space intact, and any-run-of-spaces is available when a column is narrow.

### What happens to a pipe in the data?

In a Markdown table a pipe would end the cell, so it is escaped as a backslash followed by the pipe. In CSV and TSV output the usual quoting rules apply instead.

### Can I drop the header?

Clear the first-row box and the table is written without one. In Markdown output that means generic column names are used, because the format expects a header line.