# CSV to Markdown Table

> Turn CSV, semicolon or tab-separated data into a neat GitHub Markdown table with column alignment. Paste a Markdown table to convert it back to CSV.

Use it free at https://swipetolaunch.com/tools/csv-to-markdown

## How to use it

1. **Paste your data.** Straight from a spreadsheet (tab separated) or a .csv file. The separator is detected for you.
2. **Set the options.** Say whether the first row is a header and pick a column alignment.
3. **Copy the table.** Columns are padded so the Markdown reads cleanly as plain text too.

## Markdown tables without the typing

Writing a Markdown table by hand means counting pipes and dashes. Pasting data in is faster: copy a range from Google Sheets, Excel or Numbers (it arrives tab separated), or open a CSV file in a text editor and paste it here.

## What the parser handles

The parser follows RFC 4180, the CSV standard:

- Fields in double quotes can contain commas, line breaks and doubled quotes (`""` for a literal quote).
- Windows (CRLF) and Unix line endings both work, and a UTF-8 byte order mark is ignored.
- The separator is detected from the first lines: comma, semicolon (common in European exports), tab or pipe.
- Rows with fewer cells are padded so every row has the same number of columns.

In the Markdown output, pipes inside cells are escaped and line breaks become `<br>`, so the table renders correctly on GitHub, GitLab, Notion, Obsidian and most docs sites.

## Alignment

GitHub-flavored Markdown sets alignment in the separator row: `:---` left, `:---:` center, `---:` right. Right alignment suits numbers and prices; left suits text.

## Going the other way

Switch the direction to paste a Markdown table and get CSV back. The first table in the text is used, escaped pipes are restored, and fields that need quoting are quoted. That is handy for pulling a comparison table out of a README into a spreadsheet.

For nested data, [JSON to Markdown](/tools/json-to-markdown) turns arrays of objects into tables too. To convert whole documents, use [HTML to Markdown](/tools/html-to-markdown).

## What you get

- RFC 4180 parsing: quotes, embedded commas and line breaks
- Detects comma, semicolon, tab and pipe separators
- Header row toggle and column alignment
- Padded columns that read well as plain text
- Markdown table to CSV in reverse

## Questions

### How do I convert an Excel sheet to a Markdown table?

Select the cells in Excel or Google Sheets, copy, and paste here. Spreadsheets copy as tab-separated text, which is detected automatically.

### Can a Markdown table cell contain a line break?

Not directly; each row must be on one line. Line breaks inside a CSV field are converted to <br>, which GitHub and most renderers display as a break.

### How do I align a column in a Markdown table?

Put colons in the separator row under the header: :--- for left, :---: for center and ---: for right. Choose an alignment here and it is written for you.

### Why does my CSV use semicolons?

Spreadsheet apps in countries that use a comma as the decimal separator export CSV with semicolons instead. The converter detects this, or you can choose the separator yourself.
