๐ CSV to Markdown Table Converter
By Shihab Mia ยท Updated 2026-07-06
Paste CSV above, then press Convert to Markdown.
This tool converts CSV data into a ready-to-paste Markdown table. Paste your CSV with the headings in the first row, pick the delimiter your file uses (comma, semicolon, tab, or pipe), and choose how columns align, then copy a GitHub Flavored Markdown table in one click. The output is always three parts: a header row, a separator row of dashes, and one data row per line, with each cell wrapped in pipes ( | ). Everything runs in your browser, so your data never leaves the page.
What is the CSV to Markdown Table?
A Markdown table is plain text that a renderer turns into a grid. It needs exactly three things: a header row, a separator row made of dashes, and at least one data row, with every cell wrapped in pipe characters. For example, the row | Name | Role | followed by | --- | --- | tells the renderer that Name and Role are column headings. This syntax is part of GitHub Flavored Markdown (GFM) and is supported by GitHub, GitLab, Bitbucket, most static site generators, and many note apps such as Obsidian and Notion. There must be at least three dashes per column in the separator row, and you should leave a blank line before the table so it renders correctly.
CSV (comma-separated values) stores the same tabular data but in a different shape: rows are separated by line breaks and cells by a delimiter, usually a comma. The catch is that real-world CSV is not simply "split on commas." A cell can be wrapped in double quotes to protect a comma or a line break inside it, and a literal double quote is written as two doubled quotes ( "" ). This converter follows those RFC 4180 rules, so a value like "Lovelace, Ada" stays in one cell instead of splitting into two, and a quoted "3.5"" screen" keeps its inch mark.
Not every file uses a comma. Exports from European versions of Excel often use semicolons because the comma is a decimal separator there, database dumps frequently use tabs (making them TSV files), and some log formats use pipes. That is why the delimiter is a setting rather than a guess. Choosing the wrong delimiter is the single most common reason a converted table collapses into one column, so match the delimiter to your source before you convert.
The pipe character needs special care. In Markdown a pipe ( | ) marks a column boundary, so any pipe that appears inside your data has to be escaped as a backslash-pipe ( \| ), otherwise it silently creates extra columns and breaks the layout. This tool escapes pipes for you. Line breaks inside a cell are converted to a line-break tag, because a Markdown table row must stay on a single physical line; GFM renderers show that tag as a real line break, while plain-text viewers show the literal tag.
Column alignment is controlled entirely by the separator row. Plain dashes ( --- ) leave a column at the renderer default (left). Adding a colon changes it: :--- forces left, :---: centers, and ---: aligns right. Right alignment is the convention for numeric columns such as prices, counts, and percentages, because it lines up the digits by place value and makes the numbers easy to scan. You can set one alignment for the whole table here, then hand-tune individual columns in the output if you need a mix.
Because the entire conversion happens locally in JavaScript, the tool works offline once the page has loaded and never uploads your data. That makes it safe for internal spreadsheets, customer lists, or any data you would not paste into a server-side converter. If you later need to go the other way, a Markdown table is easy to read back into CSV by stripping the pipes and the separator row.
When to use it
- Dropping a spreadsheet export into a GitHub README, issue, or pull request as a tidy table.
- Documenting API parameters, config options, environment variables, or test results in Markdown without hand-typing pipes.
- Converting data copied from Excel or Google Sheets (paste as tab-delimited) into docs-friendly Markdown.
- Building tables for static site generators such as Hugo, Jekyll, Astro, and Docusaurus that accept GFM.
- Turning a database query result or CSV log into a readable table for a wiki, Notion, or Obsidian note.
- Setting per-column alignment (left, center, right) for numeric or label columns in a single step.
How to use the CSV to Markdown Table
- Paste your CSV into the box, with the column headings on the first line.
- Pick the delimiter your file uses: comma, semicolon, tab, or pipe.
- Choose a column alignment: default (left), left, center, or right.
- Leave "First row is a header" ticked if your data starts with column names; untick it if it does not.
- Press Convert to Markdown, review the preview, then use Copy to grab the table source.
- Paste the result into your README, issue, wiki, or note where a blank line precedes it.
Formula & method
Worked examples
Convert a 3-column CSV with a header row and default alignment.
- Input CSV: Name,Role,City and a second line Ada,Engineer,London
- First row becomes the header: | Name | Role | City |
- Add the separator row: | --- | --- | --- |
- Each later line becomes a data row: | Ada | Engineer | London |
Result: | Name | Role | City | | ---- | -------- | ------ | | Ada | Engineer | London |
A cell contains a comma and a pipe, using center alignment.
- Input row: "Lovelace, Ada",A|B (the first cell is quoted to keep the comma)
- The parser keeps Lovelace, Ada as one cell and reads A|B as the second
- The pipe inside A|B is escaped to A\|B so it does not start a new column
- Center alignment writes the separator tokens as :---:
Result: | Lovelace, Ada | A\|B | | :-----------: | :--: |
A semicolon-delimited European export with right-aligned numbers.
- Input CSV: Product;Price and a second line Widget;19,99
- Set the delimiter to semicolon so cells split on ; not on the comma inside 19,99
- Choose right alignment so the price column lines up by digits
- The separator row becomes | ---: | ---: | and 19,99 stays in one cell
Result: | Product | Price | | ------: | ----: | | Widget | 19,99 |
Markdown separator tokens by column alignment
| Alignment | Separator token | Result in renderer | Typical use |
|---|---|---|---|
| Default | --- | Left-aligned (renderer default) | General text |
| Left | :--- | Text aligned to the left | Labels, names, notes |
| Center | :---: | Text centered in the column | Status, yes/no flags |
| Right | ---: | Text aligned to the right | Prices, counts, percentages |
Characters this converter handles specially
| Character | In CSV | In Markdown output |
|---|---|---|
| Comma inside quotes | Kept as one cell | Stays in a single column |
| Pipe ( | ) | Plain text | Escaped as \| to keep columns intact |
| Double quote ( "" ) | Doubled to escape | Becomes a single literal quote |
| Newline inside a cell | Allowed inside quotes | Converted to a line-break tag |
| Backslash ( \ ) | Plain text | Kept as written |
Common delimiters and where they come from
| Delimiter | Name | Where you see it |
|---|---|---|
| , | Comma | Standard CSV, US-region Excel and Sheets exports |
| ; | Semicolon | European Excel exports where comma is a decimal mark |
| Tab | Tab (TSV) | Copy-paste from Excel or Google Sheets, database dumps |
| | | Pipe | Some log files and legacy system exports |
Common mistakes to avoid
- Forgetting that the first row is treated as the header. By default the first CSV line becomes the table header and gets the separator row beneath it. If your data has no headings, untick "First row is a header" so every line is treated as data.
- Picking the wrong delimiter. If your export uses semicolons or tabs but the tool is set to comma, the whole table collapses into one column. Match the delimiter to your file before converting. European Excel files usually use semicolons.
- Leaving raw pipes in cells when editing by hand. A pipe inside a value starts a new column in Markdown. This tool escapes pipes for you, but if you edit the output later, remember to write \| for a literal pipe.
- Expecting multi-line cells to stay on multiple lines. A Markdown table row must be a single line, so a line break inside a cell is converted to a line-break tag. GFM renderers show it as a line break; plain-text viewers show the literal tag.
- Forgetting the blank line before the table. Most renderers need a blank line above a Markdown table, otherwise it merges with the paragraph before it and renders as plain text. Paste the table with an empty line in front of it.
- Assuming every column can have its own alignment automatically. This tool applies one alignment to all columns. If you need a mix, for example left labels and right-aligned numbers, edit the colons in the separator row of the output by hand.
Glossary
- CSV
- Comma-separated values: a plain-text format where rows are lines and cells are split by a delimiter such as a comma.
- TSV
- Tab-separated values: the same idea as CSV but cells are split by tab characters, which is what you get when you copy from Excel or Google Sheets.
- Markdown table
- A table written in Markdown using pipes for column borders and a row of dashes to separate the header from the body.
- GFM
- GitHub Flavored Markdown, the Markdown dialect used by GitHub and many tools that adds table support.
- Delimiter
- The character that separates cells in a CSV file, most often a comma, but sometimes a semicolon, tab, or pipe.
- Separator row
- The row of dashes under the header that defines the columns and, with colons, their alignment.
- Alignment token
- The colon-and-dash pattern (:---, :---:, ---:) in the separator row that sets a column to left, center, or right.
- RFC 4180
- The common specification for CSV that defines how quotes, commas, and line breaks inside cells are handled.
Frequently asked questions
How do I convert CSV to a Markdown table?
Paste your CSV into the box, choose the delimiter your file uses, pick an alignment, and press Convert to Markdown. The tool builds a GitHub Flavored table with a header row, a separator row of dashes, and one data row per line, then lets you copy it in one click.
Does the first row become the table header?
Yes. By default the first line of your CSV is used as the header and the separator row of dashes is placed beneath it. If your data has no headings, untick "First row is a header" so every line is treated as a data row.
What if my CSV uses semicolons or tabs instead of commas?
Use the Delimiter dropdown to select semicolon, tab, or pipe. The parser then splits cells on that character. Matching the delimiter to your file is important, otherwise the data collapses into a single column. European Excel exports commonly use semicolons.
How do I convert Excel or Google Sheets data to a Markdown table?
Select the cells in Excel or Google Sheets and copy them, then paste into the box and set the delimiter to tab. Copied spreadsheet cells are tab-separated, so with the tab delimiter selected the columns split correctly and you get a clean Markdown table.
How are commas and quotes inside a cell handled?
The parser follows standard RFC 4180 CSV rules. A cell wrapped in double quotes can contain commas, line breaks, and delimiters without splitting, and a doubled "" inside a quoted cell becomes a single literal quote in the output.
What happens to pipe characters in my data?
A pipe marks a column border in Markdown, so any pipe inside a cell is escaped as a backslash-pipe ( \| ). This keeps your columns intact and renders as a normal pipe character in the final table.
How do I right-align numbers in a Markdown table?
Choose the Right alignment option before converting. The separator row is then written with the colon on the right ( ---: ), which right-aligns every column so numbers line up by place value. To align only some columns, edit the colons in the output by hand.
Does this work with GitHub, GitLab, and Obsidian?
Yes. The output is standard GitHub Flavored Markdown table syntax, which GitHub, GitLab, Bitbucket, most static site generators, Obsidian, and many note apps all render. Remember to leave a blank line above the table so it renders as a grid.
Why is my whole table showing up as one column?
The delimiter setting does not match your file. If your data splits on semicolons or tabs but the tool is set to comma, every line stays in one cell. Change the Delimiter dropdown to match your file and convert again.
Is my data sent to a server?
No. The entire conversion runs in your browser with JavaScript. Your CSV is never uploaded, stored, or transmitted, which makes the tool safe to use with private or sensitive data, even offline once the page has loaded.