How to make a Markdown table from CSV

A Markdown table is the fastest way to embed tabular data in a README, issue, or docs page. The trick is escaping the characters that would otherwise break the table.

The basic shape

A Markdown table has a header row, a separator row of dashes, and one line per record. Every row has the same number of pipe-separated cells.

Escape pipes and line breaks

A pipe inside a cell must be escaped with a backslash, or it is read as a column break. A line break inside a cell should become a <br> tag so the row stays on one source line.

Keep it readable

Wide tables are hard to read. Hide columns you do not need before exporting, so the table stays focused.

Do it in your browser

Frequently asked questions

Which Markdown flavor is used?
GitHub-flavored Markdown, which GitHub, GitLab, and many docs tools render.
Will it paste into Notion?
Yes, Notion recognizes a Markdown table when pasted.
Can I convert Excel instead?
Yes, there is a matching Excel to Markdown page.

Keep reading