What is a CSV to Markdown table converter?
Markdown tables are the standard way to show rows and columns in a README, a pull request, a wiki or a chat message. Writing them by hand is slow and fragile: one missing pipe and the table breaks. This tool does the boring part. You give it a CSV, a TSV, cells copied from Excel or Google Sheets, or a spreadsheet file, and it writes a table in GitHub Flavored Markdown (GFM).
Pasting from a spreadsheet works because Excel and Sheets copy cells as tab-separated text. The tool detects the separator (comma, semicolon, tab or pipe) and you can force one if the guess is wrong. It also opens spreadsheet files, with a choice of sheet when the workbook has more than one.
The details that usually break a table are handled for you. A pipe inside a cell is escaped as \|. A line break inside a cell becomes <br>. Short rows are filled with empty cells. Wide characters such as Japanese count as two columns when the columns are aligned, so the pipes still line up in a monospaced font. Alignment can be automatic (a column is right-aligned only when every value in it is a number), left, center, right or none. You can also choose compact output without padding. Everything runs in your browser, so a private spreadsheet never leaves it.
How to turn a spreadsheet into a Markdown table
- Copy the cells in Excel or Google Sheets and paste them in the input box, or paste CSV text, or open a spreadsheet file (xlsx, xls, ods or csv).
- Keep "first row is the header" on when your first row holds column names. Turn it off and the table gets an empty header row, because GFM needs one.
- Pick an alignment: auto, left, center, right or none. Auto right-aligns numeric columns only.
- Choose "align the columns" for neat padded text, or leave it off for a compact table that is shorter to paste.
- If the separator was guessed wrong, choose comma, semicolon, tab or pipe yourself.
- For a workbook with several sheets, choose the sheet.
- Copy the result into your README, issue or document. To check how it looks, run it through Markdown to HTML.
Examples
A small CSV with tricky cells
Input:
Product,Units,Price,Note
Keyboard,120,49.90,USB-C | wired
Mouse,85,19.50,
Monitor 27",12,329.00,"IPS, 4K"
Cabo HDMI,300,7.25,2 mOutput with auto alignment and aligned columns:
| Product | Units | Price | Note |
| ----------- | ----: | -----: | -------------- |
| Keyboard | 120 | 49.90 | USB-C \| wired |
| Mouse | 85 | 19.50 | |
| Monitor 27" | 12 | 329.00 | IPS, 4K |
| Cabo HDMI | 300 | 7.25 | 2 m |Units and Price are right-aligned because every value is a number. The pipe in "USB-C | wired" is escaped, and the quoted comma in "IPS, 4K" stays in one cell.
Cells pasted from a spreadsheet
Input (tab-separated, as copied from Excel):
a b
1 2Output:
| a | b |
| --: | --: |
| 1 | 2 |Compact output
The same idea with "align the columns" off, for input a,bb and 1,2:
| a | bb |
| --: | --: |
| 1 | 2 |Markdown renderers do not care about the padding. Compact output is just shorter, while aligned output is easier to read in the source.
Common mistakes
- A quoted field that never closes. If a cell starts with a quote and the closing quote is missing, the tool reports the line. Close the quote.
- Wrong separator. European CSV files often use semicolons. If everything lands in one column, set the separator by hand.
- Expecting formatting to survive. Markdown tables hold plain text. Bold, colors and merged cells in a spreadsheet are not carried over.
- Huge tables in a README. A table with dozens of columns is hard to read as text. Select fewer columns first with CSV tools.
- Forgetting the header. GFM requires a header row. With the option off, an empty header is written so the table is still valid.
- Rendering differences. The generated Markdown follows GFM and was checked with a CommonMark parser, but some older renderers do not support tables at all.
Frequently asked questions
Does the tool upload my spreadsheet?
No. Pasted text and opened files are processed in your browser, and nothing is sent to a server.
How do I align a column to the right?
Choose "right" in the alignment control, or leave it on auto, which right-aligns columns where every value is a number. Left, center and none are also available.
What happens to a line break inside a cell?
It becomes <br>, because a Markdown table row must stay on one line. Most renderers show it as a line break.
Can I convert the table to something else?
Yes. Use data converter for JSON, YAML or XML, or Excel to JSON when you want a list of objects.