Skip to content
ToolPlankDEV
Text Tools
100% In-Browser Execution

Updated:

CSV to Markdown Table Converter

Use this csv to markdown converter to turn CSV, TSV or cells copied from a spreadsheet into a Markdown table. Choose alignment and padding, and cells with commas, quotes and pipes are handled. It also converts a table back to CSV.

Options:

CSV or table

Input
0 chars Ā· 0 lines

Result

Ready
Processing in browser...
0 chars Ā· 0 linesUpdates as you type

Processed on your device. Your text is not sent to our servers.

More free tools you may need next.

Quick Guide

How to use CSV to Markdown Table

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste your data

    Paste CSV text, or copy cells from Excel or Google Sheets and paste them in. You can also drop a .csv or .tsv file onto the box. Press Example to load a small table.

  2. 02

    Check the separator

    Separator is set to Auto-detect, which picks comma, tab, semicolon or pipe from the first line. Choose one yourself if the table comes out as a single column.

  3. 03

    Set the look of the table

    Align sets the alignment of the columns. First row is the header makes the first CSV row the header of the table. Align columns pads the cells with spaces so that the raw Markdown is easy to read. Trim spaces cleans the edges of each cell.

  4. 04

    Copy the Markdown

    The Markdown table updates as you type. Press Copy, or Download to save it. To go the other way, set Convert to Markdown to CSV and paste a Markdown table.

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:

markdown
| 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:

Text
| 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.

Frequently Asked Questions

Technical Q&A for CSV to Markdown Table

Common questions about edge cases, character encoding, and privacy guarantees.

Paste the CSV into the box. The Markdown table appears on the right with a header row, an alignment row and one line for each record. Press Copy to use it.

Select the cells in Excel, copy them and paste them into the box. The tool detects the tab separator and writes the Markdown table.

Nothing. MD is the usual short name for Markdown files, and a table is the Markdown element that this tool writes.

Set Convert to Markdown to CSV and paste the table. The result is comma-separated text that you can save as a .csv file.

Convert it to CSV with this tool, save the text as a .csv file and open that file in Excel.

A comma in a quoted CSV cell stays in the cell. A pipe sign is escaped as \| so that it does not start a new column.

Turn off First row is the header. The table gets an empty header row, which a Markdown table needs, and all your rows stay as data.

Yes. Align sets all columns to left, center, right or the default. Right alignment suits numbers.

Yes. Auto-detect picks a comma, tab, semicolon or pipe from the first line, and you can set the separator yourself.

No. The conversion runs in your browser and nothing is sent to a server or saved. Reloading the page clears the boxes.