How to Convert CSV to Markdown
To convert CSV to Markdown, paste the CSV text into the box. The tool reads each row and column and writes a Markdown table with a header row, a separator row and one line per record. With the Example data it looks like this:
| Name | Role | Notes |
| :----------- | :------------ | :------------------------------- |
| Ada Lovelace | Mathematician | Wrote the first program, in 1843 |
| Linus | Engineer | Pipes \| and more |
| Grace | Admiral | |Three things were handled for you. The comma inside the quoted Notes cell did not split the cell. The pipe sign in the second row was escaped as \|, because a bare pipe would start a new column. The empty cell in the last row became an empty column.
Copy a Table from Excel or Google Sheets
A range copied from Excel or Google Sheets reaches the clipboard with a tab between the cells and a line break between the rows. Paste it into the box and Auto-detect picks the tab as the separator, so you can get an Excel to Markdown table without saving a CSV file first.
If you have a whole spreadsheet file instead of a range, Excel to JSON turns .xlsx and CSV files into JSON. Going the other way, JSON to Excel writes a spreadsheet from JSON.
Alignment, Padding and the Header Row
The second line of a Markdown table sets the alignment with colons: :--- is left, :---: is center, ---: is right and --- leaves it to the renderer. Align applies the choice to every column. Numbers usually read best aligned right.
Align columns adds spaces so every column has the same width in the raw text. It makes no difference to how the table is shown, but it makes the Markdown easier to read and to compare in a code review. Turn it off for the shortest possible output.
A Markdown table must have a header row. If your CSV has no header, turn off First row is the header. The table then gets an empty header row and every CSV row stays as data.
Commas, Quotes, Pipes and Line Breaks Inside Cells
- A comma or a line break inside a cell is fine when the cell is in double quotes, as CSV expects. Two double quotes in a row inside a quoted cell stand for one.
- A pipe sign inside a cell is escaped, so it does not break the table.
- A line break inside a cell becomes a <br> tag, because a Markdown table row cannot span lines. Most Markdown renderers that allow HTML show it as a line break.
- Rows with fewer cells than the longest row are filled with empty cells, so the table stays rectangular.
- Completely empty rows are left out.
If the line breaks in a cell are not wanted, Remove Line Breaks joins them first.
How the Separator Is Found
Auto-detect counts the commas, tabs, semicolons and pipes in the first line, ignoring any that sit inside double quotes, and uses the one that appears most. A file with one column has no separator at all, and a comma is used. Semicolon-separated files are common in countries where the comma is the decimal mark.
If the first line is unusual, choose the separator yourself in the Separator menu. A list that is only one value per line does not need a table. For that, see Column to Comma Separated List.
Convert a Markdown Table to CSV
Set Convert to Markdown to CSV and paste a Markdown table. The tool removes the outer pipes and the separator row, splits the cells, turns an escaped pipe back into a pipe and a <br> tag back into a line break, and writes comma-separated text. Cells that contain a comma, a quote or a line break are put in double quotes. With a small table:
| Name | Role |
| :-- | :-- |
| Ada | Math, logic |
ā
Name,Role
Ada,"Math, logic"Save the result as a .csv file and Excel and other spreadsheet programs can open it. Every line of the input must contain a pipe sign, otherwise the tool says which line is not part of a table. For a README with several tables, bold text, links or escaped pipes, use Markdown Table to CSV, which lists every table and cleans the cells.
Where Markdown Tables Work
Tables are not part of the original Markdown. They come from extensions, and GitHub Flavored Markdown is the best known. GitHub, many documentation tools and many note-taking apps display them, but some renderers do not. Check how your target handles tables before you rely on them.
The tool writes plain pipe tables with a separator row. It does not write HTML tables, and it has no preview. Input is limited to 2,000,000 characters, and your data is converted by code running in your browser. It is not sent to a server and not stored. See the Privacy Policy for details.