Format Code Now
/
Format & validateMarkdown Table Generator Next: JSON to C# ›

Markdown Table Generator

FV-13

Paste CSV or TSV, such as cells copied from a spreadsheet, to get a GitHub-flavored Markdown table. A second action turns a Markdown table back into CSV.

Runs in your browser. Nothing is uploaded.

CSV or TSV (or a Markdown table for the reverse)

Result

How to use it

  1. Paste CSV or TSV into the input box. The delimiter is detected from the first line, or you can choose it.
  2. Pick the column alignment and whether the first row is the header.
  3. Choose CSV to Markdown and copy the table.
  4. To go the other way, paste a Markdown table and choose Markdown to CSV.

How rows and cells are converted

Quoted fields and doubled quotes are read as in standard CSV, and a cell can hold commas or line breaks. A pipe inside a cell is written as \| so it does not split the column, and a line break inside a cell becomes <br>, because a Markdown row must stay on one line. Short rows get empty cells. By default each column is padded so the table lines up in a plain text editor.

Alignment and the header row

Alignment is set with colons in the separator row: left, center, right, or none for the renderer's default. It applies to every column. The first row becomes the header, as GitHub requires one. If your data has no header, untick the option and an empty header row is written. Padding counts characters, so wide characters such as Chinese or emoji can look uneven in a monospace editor, but the table still renders correctly.

Markdown back to CSV

The reverse action finds the first table, meaning a header line followed by a separator row of dashes, and reads rows until the first blank line. Escaped pipes and <br> are turned back into the characters they stand for. Extra cells beyond the header width are dropped, as GitHub does. Formatting such as **bold** or links is copied as text, not removed. Choose a comma, tab or semicolon for the CSV output.

Error messages and what to do

MessageWhat it meansFix
No rows found. Paste CSV or TSV with one row per line.The input is empty or holds only blank lines.Paste at least one row of data.
A quoted field is never closed (missing closing ")A field starts with a quote but never ends with one.Add the closing quote.
No Markdown table found. The second line of a table must be a separator row such as | --- | --- |.Markdown to CSV did not find a header line followed by a dash row.Add the separator row under the header.
The separator row on line 2 has 2 columns but the header has 3.The dash row and the header have different numbers of columns.Make both rows the same width.

Questions people ask

How do I turn Excel data into a Markdown table?

Copy the cells in Excel or Google Sheets and paste them into the input box. Copied cells are tab-separated, which the tool detects. Choose CSV to Markdown and copy the table.

How do I align columns in a Markdown table?

Alignment goes in the separator row: :--- for left, :---: for center, ---: for right. Pick one in Column alignment and the tool writes the colons for every column. Per-column alignment is not offered here.

What happens to a pipe character inside a cell?

It is written as \| so renderers do not treat it as a column break. Converting back to CSV turns \| into a pipe again.

Can a cell contain a line break?

Markdown table rows must be one line, so the tool writes <br> where the cell had a line break. GitHub shows that as a break. The reverse action turns <br> back into a line break.

Does the table need to be padded?

No. Padding only helps people read the source of the table. Untick Pad columns to equal width for a compact table; renderers show both versions the same way.

Which Markdown flavor does the table use?

GitHub-flavored Markdown tables, which are also supported by many other renderers. Plain original Markdown has no table syntax, so a few strict renderers will show the text as is.

About this tool

CSV or TSV is read with quoted fields and doubled quotes supported. A pipe inside a cell becomes \| and a line break inside a cell becomes <br>, since a Markdown row must stay on one line. Short rows are padded with empty cells. Padding counts characters, so wide characters such as Chinese or emoji can look uneven in a monospace editor, though the table still renders correctly. If the first row is not a header, an empty header row is written. Markdown to CSV reads the first table it finds (a header, a --- separator row, then rows) and stops at the first blank line; extra cells beyond the header width are dropped, as GitHub does. Inline formatting such as **bold** is copied as text, not removed.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.