CSV to Markdown table
Paste CSV or TSV (or open a file) and get a neatly aligned Markdown table — delimiter detected, pipes escaped, column alignment your choice. Works in reverse too.
How to convert CSV to a Markdown table
- Paste CSV or TSV into the box, or drop a .csv / .tsv file onto it. The delimiter (comma, semicolon, tab, or pipe) is detected — override it if a file uses something unusual.
- Tell it whether the first row is a header. If not, it generates Column 1, Column 2… (a Markdown table always needs a header).
- Pick pretty (padded, readable in a text editor) or compact output, and how columns align — numbers are right-aligned automatically.
- Copy the Markdown table or download it as a .md file. The rendered preview shows exactly how GitHub will display it.
The CSV parser follows RFC 4180, so the awkward parts of real files just work: fields wrapped in quotes that contain commas, doubled "" quotes, line breaks inside a field, a UTF-8 byte order mark from Excel, and rows with fewer cells than the header (padded, with a note telling you how many). Column widths are measured by display width, so Chinese, Japanese, and Korean text and emoji line up in the raw Markdown too.
Markdown table syntax, explained
A Markdown table (the GitHub-flavored Markdown extension that GitHub, GitLab, Obsidian, Notion imports, and most static site generators support) is three things: a header row, a delimiter row of dashes, and data rows, with cells separated by pipes.
table.md
| Item | Region | Units | Price |
| :-------- | :----: | ----: | ------: |
| Widget | EMEA | 1,200 | 19.99 |
| Gadget | APAC | 85 | 249.00 |
| A \| B | — | 7 | 5.00 |- Colons in the delimiter row set alignment: :--- left, :---: center, ---: right, plain --- default.
- The outer pipes are optional and the padding is cosmetic — renderers ignore it. The formatter adds it so the source stays readable.
- A literal pipe inside a cell is written \|; a line break is written <br>.
- Cells can hold inline Markdown — **bold**, `code`, links — but not block content like lists or multiple paragraphs.
Convert a Markdown table to CSV format
The Markdown → CSV tab reverses the process: paste a table copied from a README, a GitHub issue, or an LLM answer and get clean CSV. It finds every table in a longer document (skipping code blocks), so you can paste a whole .md file and choose the table you need. Escaped pipes are unescaped, <br> becomes a real line break inside a quoted field, and you can strip inline formatting so **42** becomes plain 42.
Opening the result in Excel? Use a semicolon delimiter if your Excel uses a comma as the decimal separator (most of europe), and tick "Add BOM" so accented characters and emoji survive the import. To go straight into a spreadsheet file, the Markdown to Excel converter downloads a real .xlsx with numbers typed as numbers, and the Markdown table to JSON converter turns the same table into an array of objects.
A Markdown table generator and formatter
Not starting from a CSV? The Table generator tab is a small spreadsheet that writes Markdown: type into cells, add rows and columns, set alignment per column, and copy the result. Press Enter to move down a row (a new row is added at the end), or paste a block of cells copied from Excel or Google Sheets and it fills the grid. Any table you convert or format can be opened in the grid with "Edit as grid".
The Markdown table formatter fixes tables that were typed by hand or generated without padding: it re-aligns every column to its widest cell, normalizes the delimiter row, keeps (or changes) each column's alignment, adds a missing delimiter row, and pads short rows — across every table in a document at once.
CSV to Markdown in Python, pandas, and the command line
If you convert tables as part of a script, these do the same job:
Python (pandas + tabulate)
import pandas as pd
df = pd.read_csv("data.csv")
print(df.to_markdown(index=False)) # pip install tabulate
print(df.to_markdown(index=False, tablefmt="github"))Command line
# pandoc 2.9+ reads csv directly
pandoc -f csv -t gfm data.csv -o table.md
# csvkit renders a markdown-compatible table
csvlook data.csvGoing the other way, pandas has no read_markdown; the usual trick is pd.read_csv(path, sep="|") followed by dropping the empty edge columns, stripping whitespace, and removing the delimiter row — which is exactly the fiddly part this page does for you, with escaped pipes handled correctly.
Frequently asked questions
How do I convert CSV to a Markdown table?
Paste the CSV (or open or drop a .csv file) in the CSV → Markdown tab. The delimiter is detected automatically, the first row becomes the header, and the Markdown table appears as you type — copy it or download it as a .md file. Quoted fields with commas or line breaks, empty cells, and ragged rows are all handled.
How do I convert a Markdown table to CSV?
Switch to the Markdown → CSV tab and paste the table — or a whole Markdown document; every table in it is found and you pick which one to convert. Choose comma, semicolon, tab, or pipe as the delimiter, then copy the CSV or download it. Escaped pipes become real pipes and <br> tags become line breaks inside quoted fields.
Is there a free Markdown table generator?
Yes — the Table generator tab is an editable grid: type into the cells, add or remove rows and columns, click a column's alignment to cycle left, center, and right, and copy the generated Markdown. You can paste a block of cells copied from a spreadsheet straight into the grid, and your draft is remembered in this browser.
How do I format or align a messy Markdown table?
Use the Format Markdown table tab. Paste a table with ragged pipes and uneven columns and it is re-emitted with every column padded to the same width. Paste a whole README and every table in it is formatted in place while the rest of the text is left alone. A table missing its | --- | delimiter row gets one added.
How do I align columns in a Markdown table?
Alignment lives in the delimiter row under the header: :--- aligns left, :---: centers, and ---: aligns right. A plain --- leaves it to the renderer (usually left). This converter right-aligns numeric columns automatically, and you can set any column individually.
How do I put a pipe character inside a Markdown table cell?
Escape it with a backslash: \|. An unescaped | always starts a new cell, even inside `code`. The converter escapes pipes for you when it builds the table and turns \| back into | when converting Markdown to CSV.
Can a Markdown table cell contain a line break?
Not a literal one — every table row must be on a single line. Use an HTML <br> tag instead, which GitHub, GitLab, and most renderers display as a line break. CSV fields that contain line breaks are converted to <br> automatically (or to a space, if you prefer).
How do I convert CSV to Markdown in Python?
With pandas: pd.read_csv("data.csv").to_markdown(index=False). to_markdown needs the tabulate package installed (pip install tabulate) and passes extra options like tablefmt to it. For a one-off conversion, pasting into this page is faster and needs no environment.
Does a Markdown table need a header row?
Yes — GitHub-flavored Markdown tables always have a header row followed by the delimiter row. If your CSV has no header, choose "No header" and the converter adds Column 1, Column 2… or leaves the header cells blank.
Is my CSV uploaded anywhere?
No. Parsing and conversion run entirely in your browser; files you open or drop are read locally and never leave your machine.
Related free tools
See all free tools →Built something? Put it online in seconds
host0 is the cloud for small software: bring any coding agent, build the tool only you need — like this one — and say "deploy to host0". Live at a shareable URL, no servers to run.