CSV to Markdown Table Converter

Convert CSV files into Markdown table syntax (`| col1 | col2 |`). Choose the delimiter, whether to use the first line as a header, and column alignment (left, center, right). The result can be copied or downloaded. Conversion runs entirely in your browser; no data is sent to a server.


Delimiter
Use first line as header
Column alignment


            
            Copied!
            
          

Enter CSV data to see the generated Markdown table here.

How a CSV row maps to a Markdown table

One CSV row name,age,city
Resulting Markdown syntax | name | age | city |

When the first line is used as a header, it becomes the header row, followed by a delimiter row (---) that indicates alignment, and then each subsequent row becomes one data row.

Tips

  • Any pipe character (|) inside a cell is automatically escaped as \| so it is not mistaken for a column separator.
  • Line breaks inside quoted multi-line cells are replaced with a single space, since a Markdown table row must fit on one physical line.
  • Choosing "Left", "Center", or "Right" alignment inserts `:---`, `:---:`, or `---:` into the delimiter row, so renderers like GitHub display the columns with the intended alignment.
  • Combine this with the sister tools CSV to JSON and CSV to SQL to convert a single CSV into whichever of the three output formats you need.

Frequently Asked Questions

It is a notation where cells separated by pipes (|) are laid out on one line, and a delimiter row made of `---` right after the header row tells the renderer to treat it as a table. It is supported by GitHub READMEs and most other Markdown renderers.

Alignment is specified by adding colons (:) before and/or after the hyphens in the delimiter row. `:---` means left-aligned, `:---:` means centered, and `---:` means right-aligned; this tool inserts the correct syntax automatically once you pick an alignment option.

Yes. Commas inside quoted cells are not mistaken for column separators, and line breaks are converted to a single space, so even complex CSV data copied from Excel converts without breaking the table layout.

No. All conversion happens in JavaScript running in your browser, and the CSV content you enter is never transmitted to any server.
ツールくん

Side Note — Why Markdown tables need nothing but pipes and hyphens

Markdown was devised in 2004 by John Gruber and Aaron Swartz as a lightweight markup language built around the idea that plain text should still make sense when read as-is. Table syntax is no exception: because rules are drawn with nothing but pipes and hyphens, there is no need for opening and closing tags like HTML's `

`, and the shape of the table is roughly recognizable just by looking at the unrendered source.

Table syntax was never part of John Gruber's original Markdown specification; it was added later as an extension by PHP Markdown Extra and, more influentially, GitHub Flavored Markdown (GFM). Because of this, subtle behavioral differences remain between implementations (such as how mismatched column counts are handled), and most major platforms — GitHub, GitLab, and similar sites — broadly follow GFM.

The need to paste spreadsheet or database output directly into documentation comes up constantly when writing READMEs, issues, and technical blog posts. Typing out pipes and delimiter rows by hand is tedious, so a one-click CSV converter has become a standard piece of prep work for developers who write documentation in Markdown.