CSV to Markdown Table Converter

Paste CSV, TSV or cells copied from Excel or Google Sheets and get a clean GitHub-flavoured Markdown table, an HTML table, or go back from Markdown to CSV.

Free, no sign-upRuns in your browserUpdated November 2026
Tip: copy cells in Excel or Google Sheets and paste them here. Tabs are detected automatically.
Options
Column alignment
Live preview

How to use the CSV to Markdown Table Converter

  1. Paste CSV or TSV text, or copy a range of cells in Excel or Google Sheets and paste it into the input box. The delimiter is detected automatically.
  2. Choose CSV → Markdown for a GitHub table or CSV → HTML for a <table>. Untick First row is the header if your data has no header row.
  3. Set left, center or right alignment for each column, or click Numbers right to right-align numeric columns.
  4. Check the live preview, then click Copy or Download.
  5. To go the other way, pick Markdown → CSV, paste a Markdown table and download a CSV file for Excel.

Turn spreadsheet data into a Markdown table

Markdown has no way to import a spreadsheet. A table in a GitHub README, a pull request, a Notion page or a docs site has to be typed out by hand, with pipes between cells and a row of dashes under the header. This becomes tedious beyond a handful of rows, and one missing pipe shifts every later cell into the wrong column. This converter writes the table for you from CSV, TSV or cells copied straight out of Excel, Google Sheets, LibreOffice Calc or Numbers. Everything runs in your browser, so the data never leaves your device.

How the conversion works

CSV / TSV text → RFC 4180 parse → rows × columns → escape each cell → | header | + | --- | + | rows |

The input is parsed with an RFC 4180 parser, the same rules Excel and most databases use when they write CSV. A quoted field can contain the delimiter, line breaks and doubled quotes (""), so "Dark roast, 1 kg" stays one cell. When you copy cells from a spreadsheet, the clipboard holds tab-separated text. The auto-detector tries tab, comma, semicolon and pipe, then picks the delimiter that splits the first rows into the most consistent number of columns. You can always override it.

Each cell is then made safe for Markdown:

  • Pipes inside a cell become \|, so Mug | large stays in one column instead of creating an extra one.
  • Line breaks inside a quoted cell become <br>. GitHub renders this as a line break inside the cell, because a raw newline would end the table row.
  • Ragged rows, where some rows have fewer cells, are padded with empty cells so every row has the same column count.
  • Empty lines and a UTF-8 byte-order mark from Excel exports are ignored.

Column alignment in GitHub-flavoured Markdown

Alignment is set by colons in the separator row under the header. GitHub, GitLab, Bitbucket, VS Code, Obsidian and most static site generators follow the GFM table syntax:

SeparatorAlignmentTypical use
---Default (left in most renderers)General text
:---LeftNames, descriptions
:---:CenterShort status values, icons, yes/no
---:RightPrices, counts, percentages

The Numbers right button right-aligns every column whose cells are all numbers, including values like $12.50, 1,200 or 45%, so digits line up for easy comparison. With Pad columns turned on, cells are padded with spaces so the raw Markdown also lines up in a code editor. Padding counts characters, so wide CJK characters and emoji may still look slightly uneven in plain text. The rendered table is not affected.

Worked example

This CSV input:

Product,Price,Notes
Coffee beans,12.50,"Dark roast, 1 kg"
Mug | large,15.99,

with the Price column set to right-aligned, becomes:

| Product      | Price | Notes            |
| ------------ | ----: | ---------------- |
| Coffee beans | 12.50 | Dark roast, 1 kg |
| Mug \| large | 15.99 |                  |

The quoted comma stays inside its cell, the pipe is escaped, and the empty Notes cell is kept as an empty column.

Markdown table to CSV and HTML

The Markdown → CSV mode reads the first GFM table it finds in the text you paste. Prose before or after the table is ignored. Escaped pipes are restored to |, <br> becomes a real line break, and the result is written as RFC 4180 CSV with CRLF line endings and a byte-order mark, so Excel opens accented and non-Latin text correctly. Any cell that starts with =, +, - or @ and is not a plain number gets an apostrophe prefix by default. This blocks CSV formula injection when the file is opened in a spreadsheet, and you can switch it off. If your Excel uses a comma as the decimal separator, tick Use semicolons.

The CSV → HTML mode outputs a plain <table> with <thead> and <tbody>. Each cell is HTML-escaped, so text like <script> shows as text and never runs. Alignment uses text-align styles. Paste it into a CMS, an email template or any page that doesn't render Markdown.

Tips and common mistakes

  • No header row? GFM tables must have a header. Untick the header option and the tool adds Column 1, Column 2 and so on, which you can rename.
  • Everything in one column usually means the wrong delimiter. European Excel exports use semicolons, so pick it manually if auto-detect guesses wrong.
  • Very wide tables are hard to read on GitHub, because they scroll sideways. Consider splitting them, or transposing them in your spreadsheet first.
  • Markdown inside cells such as **bold** or [links](https://example.com) is passed through unchanged, so it still renders in the final table.

Need the table in a document? Paste the Markdown into the Markdown to PDF converter or the Markdown editor. To turn the same data into JSON, use CSV to JSON.

Frequently asked questions

How do I convert an Excel table to Markdown?
Select the cells in Excel (or Google Sheets), press Ctrl+C or Cmd+C, and paste into the input box. The clipboard holds tab-separated text, which the tool detects automatically and turns into a GitHub-flavoured Markdown table. There is no need to save a CSV file first.
How do I put a pipe character inside a Markdown table cell?
Escape it with a backslash as \|. This converter does that for you, so a cell such as Mug | large stays in one column. When converting Markdown back to CSV, \| is turned back into a plain pipe.
How do I right-align or center a column in a Markdown table?
Add colons to the separator row: :--- is left, :---: is center and ---: is right. Pick an alignment per column in the tool, or use Numbers right to right-align every numeric column automatically.
Can a Markdown table cell contain a line break?
Not with a raw newline, because that ends the row. GitHub and most renderers accept <br> inside a cell instead, and the tool converts line breaks in quoted CSV cells to <br> automatically.
Does a Markdown table need a header row?
Yes. The GFM table syntax requires a header row followed by a separator row. If your data has no header, untick First row is the header and the tool generates Column 1, Column 2 and so on.
Can I convert a Markdown table back to CSV for Excel?
Yes. Choose Markdown → CSV and paste the table, even with text around it. The first table is converted to RFC 4180 CSV with a byte-order mark so Excel reads Unicode correctly. Formula-like cells are neutralised by default.
Is my data uploaded anywhere?
No. Parsing and conversion run entirely in your browser with JavaScript. Nothing you paste is sent to a server or saved.

Last reviewed November 2026. Results are estimates for information only — see our disclaimer.