How to use the CSV to Markdown Table Converter
- 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.
- 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. - Set left, center or right alignment for each column, or click Numbers right to right-align numeric columns.
- Check the live preview, then click Copy or Download.
- 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
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
\|, soMug | largestays 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:
| Separator | Alignment | Typical use |
|---|---|---|
--- | Default (left in most renderers) | General text |
:--- | Left | Names, descriptions |
:---: | Center | Short status values, icons, yes/no |
---: | Right | Prices, 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?
How do I put a pipe character inside a Markdown table cell?
\|. 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?
:--- 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?
<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?
Can I convert a Markdown table back to CSV for Excel?
Is my data uploaded anywhere?
Last reviewed November 2026. Results are estimates for information only — see our disclaimer.