How to make a Markdown table from CSV
- Paste CSV, or open a
.csvor.tsvfile. The first row becomes the table header (switch it off under Parsing options if your data has none). - Pick an alignment. Auto right-aligns columns that contain only numbers; Per column lets you set each one.
- Copy the Markdown, or download it as a
.mdfile. The preview shows how it will render.
What each option does
- Alignment
- Writes
:---,:---:or---:in the delimiter row. "None" leaves it to the renderer, which usually means left. - Pad cells
- Adds spaces so every column has the same width in the source.
- Escape Markdown formatting
- Prefixes characters such as * and _ with a backslash so values like
file_name_v2do not turn into italics. - Line breaks
- Table rows must stay on one line, so in-cell breaks become
<br>or a space.
Frequently asked questions
How are pipe characters handled?
A | inside a cell would end the cell, so it is written as \|. If the data already has a backslash right before a pipe, that backslash is escaped too, so the cell is not split and the text renders exactly as it was.
Can a Markdown table cell contain a line break?
Not a real one: every table row has to be on one line. Line breaks inside cells are written as <br>, which GitHub, GitLab and most renderers show as a line break, or as a space if you prefer plain text.
Does the padding matter?
Not to renderers, which ignore it. Padding only makes the raw Markdown easier to read and edit. Wide characters such as Chinese or Japanese count as two columns, so the pipes still line up in a monospace editor.