CSV to Markdown Table

Convert CSV to a Markdown table instantly in your browser. Supports quoted fields, uses the first row as the header, and lets you choose left, center, or right column alignment. Runs in your browser.

  • Runs in your browser
  • Tool input is not uploaded to ZeroTool servers
  • Free · No Sign-Up
Column Alignment Left, Center or Right applies to every column and immediately updates existing input. The separator row controls alignment in a Markdown renderer.
Clears both panes, the status and pending conversion. Alignment stays selected. Ctrl+L (⌘+L on Mac) also clears while focus is inside this tool.
Paste comma-separated CSV. The first row becomes the header. After 0.3 seconds without typing, the table updates. Quoted commas and line breaks are supported.
Copies the complete current CSV input. An empty input cannot be copied.
The output is a Markdown table. Pipes inside cells are escaped and line breaks become spaces. Extra cells add named columns; the status lists them.
Copies the complete generated Markdown table for use in GitHub, GitLab or a Markdown editor. An empty result cannot be copied.
The Markdown table will appear here.
Examples, details and FAQ Worked examples, how it compares with other tools, and answers to common questions.

Markdown Table Syntax

A Markdown table consists of a header row, a separator row, and data rows. Pipe characters (|) delimit columns.

| Name  | Age | City     |
| :---- | :-- | :------- |
| Alice | 30  | New York |
| Bob   | 25  | London   |

The separator row controls alignment: :--- = left, :---: = center, ---: = right.

Tips

  • Pipe characters (|) inside cell values are automatically escaped as |, unless they are already escaped.
  • Newlines within quoted CSV fields are collapsed to a single space in the output.
  • Use the CSV to JSON tool if you need JSON output instead.

Example

Input, with Right alignment:

product,price,units
Widget,9.99,150
"Gadget, large",24.99,42
Cmd|Ctrl+C,1,2

Output:

| product       | price | units |
| --------------: | ------: | ------: |
| Widget        | 9.99  | 150   |
| Gadget, large | 24.99 | 42    |
| Cmd\|Ctrl+C   | 1     | 2     |
  • The quotes around "Gadget, large" are removed and the comma stays in the cell.
  • | inside a value is written as \|, so it does not start a new column.
  • The separator row is wider than the other rows. Markdown renderers ignore this, and the table renders correctly.

Example: Empty Cells and Center Alignment

With Center alignment, this input has a missing last field in two rows and a city name in Japanese:

id,city,score
1,東京,9.5
2,"Paris, FR",
3,Berlin
| id  | city      | score |
| :---: | :---------: | :-----: |
| 1   | 東京        | 9.5   |
| 2   | Paris, FR |       |
| 3   | Berlin    |       |

Row 2 ends with a comma, so its score is an empty string; row 3 has only two fields and gets an empty cell. Both render as blank cells. The columns are padded by character count, so in a monospace editor the row with 東京 looks misaligned (each of those characters is two columns wide); the rendered table is not affected.

A file saved from Excel as "CSV UTF-8" starts with a byte order mark. The tool removes it, so the first header is id, not an invisible character followed by id. Line breaks inside quoted fields, including Windows \r\n ones, become single spaces.

Example: Pipes and Quotes

A small table of patterns. The second row already contains an escaped pipe, and the third has an inch mark in the middle of a field:

pattern,meaning
a|b,a or b
a\|b,already escaped
size 5" pipe,inch mark
| pattern      | meaning         |
| :------------- | :---------------- |
| a\|b         | a or b          |
| a\|b         | already escaped |
| size 5" pipe | inch mark       |

The plain | gets a backslash; \| is left alone, so both rows show a|b and no cell is split. The " after 5 is not at the start of the field, so it stays in the cell.

Where Markdown Tables Render

GitHub and GitLab render this table syntax in READMEs, issues, pull requests, and wikis (GitHub Flavored Markdown spec, tables). Tables are an extension: CommonMark without extensions shows the lines as plain text. Static site generators such as Docusaurus, MkDocs, and VitePress support GFM tables.

Limits

  • Commas only. Text copied from Excel or Google Sheets is tab-separated, and semicolon-separated CSV is common in some locales. Both become a single column. Save the sheet as CSV (comma) first.
  • Rows longer than the header get extra columns. The table has as many columns as the longest row. Columns without a header are named Column N by position (Column 4 for the fourth), and the status line lists them. A row with fewer fields gets empty cells.
  • One alignment for all columns. To right-align only the number columns, edit the separator row after you copy, for example | :--- | ---: | ---: |.
  • Line breaks in cells become spaces. Markdown table cells cannot contain line breaks; use <br> by hand if the renderer allows HTML.
  • No formatting. Cell text is copied as is. Characters such as * and _ can still be read as Markdown emphasis.
  • Pipes follow the same rule as the Markdown Table Generator. A pipe gets a backslash only when an even number of backslashes stand before it, so a cell that already contains \| stays \| and still shows as |. To show the backslash itself, write \\| in the CSV. GitHub and micromark-based renderers (remark, MDX, Astro) then keep every cell in place.
  • Quotes count only at the start of a field. A " inside an unquoted field is text (5" pipe stays as typed). A quoted field that is never closed stops the conversion with an error that names the line where it starts.

FAQ

What CSV formats are supported?

Comma-separated values with RFC 4180 quoting: quoted fields may contain commas, line breaks and doubled quotes (""). Rows may end with LF, CRLF or CR, and a UTF-8 byte order mark at the start is removed. Tabs and semicolons are not separators.

How does column alignment work?

Choose Left, Center or Right at any time; the current table is rebuilt at once. The separator row uses :---, :---: or ---: for every column, and the Markdown renderer aligns the cells from it. To align columns differently, edit the separator row after you copy.

Does the first row become the table header?

Yes. The first row is always the header and goes above the separator row. If a later row has more fields than the header, the table gets extra columns named Column N by position, and the status lists them.

Is any data sent to a server?

No. The table is built in your browser tab, and the CSV is not sent to a server or saved in browser storage. When you finish editing the input or click an alignment, the page's analytics records one usage event with the tool name and the action (convert), not the CSV or the table.

Can I paste the output directly into GitHub or GitLab?

Yes. The output uses the GitHub Flavored Markdown (GFM) table syntax, which GitHub and GitLab render in READMEs, issues, pull requests and wikis. Renderers without the table extension show the lines as plain text.