Excel to Markdown table: paste the cells, get a table
Checked 28 November 2026 against GitHub's docs on tables and Coffee's own help. I make Coffee, so weigh what I say about it. Coffee isn't affiliated with Microsoft or GitHub.
To turn Excel cells into a Markdown table, select the cells in Excel, copy them, and paste them into a converter or an editor that understands spreadsheet cells. The free Excel to Markdown converter does it in your browser, and in Coffee you paste straight into a note on an empty line and the cells become a table. Pasting into an ordinary text editor gives you columns separated by tabs, which isn't a table yet, so something has to add the pipes.
Why Excel cells don't paste as a table
When you copy cells, Excel puts them on the clipboard in several forms: formatted for Word and Outlook, as HTML, and as plain text. The plain text has a tab between cells and a new line between rows. A Markdown editor reads plain text, so it gets this:
Item Cost Paid
Rent 900 Yes
Food 300 No
A Markdown table needs pipes between cells and a line of dashes under the first row:
| Item | Cost | Paid |
|------|-----:|------|
| Rent | 900 | Yes |
| Food | 300 | No |
The colon in -----: aligns that column to the right, which is what you want for numbers. Everything else is a straight swap of tabs for pipes.
1. A converter in your browser
Coffee's free Excel to Markdown converter takes cells pasted from Excel, Google Sheets or Numbers, or CSV, and gives a GitHub-style Markdown table with the alignment you choose. It runs in your browser, so the cells aren't uploaded anywhere.
- Select the cells in Excel, including the header row, and press ⌘C (Ctrl+C on Windows).
- Paste them into the converter.
- Choose the alignment for each column.
- Copy the table and paste it where you need it.
This is the quickest way when you're writing for GitHub, a wiki, a README or any editor that doesn't convert on paste. The free tools page has a converter for formatted text from Docs, Word or Notion too.
2. In Terminal, with one line
If you'd rather not leave the keyboard, copy the cells and run this on a Mac:
pbpaste | awk -F'\t' 'NR==1{print "| " $0 " |"; gsub(/[^\t]+/,"---"); print "| " $0 " |"; next} {print "| " $0 " |"}' | sed $'s/\t/ | /g' | pbcopy
It reads the clipboard, adds the pipes and the dashes under the first row, and puts the table back on the clipboard to paste. It doesn't align numbers or escape a | inside a cell, so it suits quick, clean tables. How to paste an Excel or Numbers table into Markdown covers the Terminal route in more detail.
For a saved file, export the sheet as CSV and convert that. CSV or Google Sheets to a Markdown table covers pandoc and csvkit.
3. Paste into an editor that converts
Some Markdown editors turn spreadsheet cells into a table as you paste. In Coffee, on the Mac, iPhone and iPad:
- In Excel, Numbers or Google Sheets, select the cells and copy them.
- In Coffee, put the caret on an empty line and paste.
- The cells become a Markdown table.
The note holds an ordinary pipe table, so it reads the same in GitHub, Obsidian or any other editor. In Coffee's Preview, the header sits on a tint and every second row is striped.
What survives the trip, and what doesn't
A Markdown table holds text in a grid, so a lot of a spreadsheet stays behind:
- Values come across, formulas don't. You get what Excel showed, such as
1,250, not=SUM(B2:B5). - Number formats come as text. A currency cell pastes as
€900or$900, as Excel displayed it. - Merged cells split. Markdown has no merged cells; the value lands in the first cell and the others are empty.
- Colours, borders and fonts go. Bold inside a cell may survive as
**bold**with some converters, but most give plain text. - Line breaks inside a cell break the table. Replace them with a space, or with
<br>if the target renders HTML. - A
|in a cell needs escaping as\|, or the row gets an extra column. - Wide tables wrap badly. Ten columns read poorly on a phone. Cut columns before you copy, not after.
Keeping totals working after the paste
A table pasted from Excel is a snapshot. If the numbers will change, it helps when the table can still add up. In Coffee on the Mac, a cell written =sum shows the total of the column above it, and =average, =count, =min, =max and =median work too:
| Item | Cost |
|-------|-----:|
| Rent | 900 |
| Food | 300 |
| Total | =sum |
The file keeps =sum, so other apps show the formula as text, and Coffee shows 1,200 in its place. Change Food to 350 and the total changes with it. A monthly budget in plain text builds a whole budget this way, and how calculations work in Coffee covers sums outside tables.
Tips for a table people can read
- Keep the header short. One or two words per column.
- Align numbers right, with
---:under the header, so the digits line up. - Put units in the header, such as
Cost (€), instead of in every cell. - Sort before copying. It's easier in Excel than by hand afterwards.
- Fewer than six columns read well almost everywhere.
The Markdown tables guide has the rest of the syntax.
Questions
How do I convert Excel to a Markdown table?
Copy the cells in Excel and paste them into a converter such as Coffee's Excel to Markdown tool, or into an editor that converts on paste. Both turn the tab-separated cells into a pipe table.
Why does pasting Excel cells into Markdown give tabs?
Excel puts cells on the clipboard as tab-separated text. Markdown needs pipes and a line of dashes, so a converter or the editor has to add them.
Can a Markdown table keep Excel formulas?
No. Markdown tables hold the values you see. In Coffee on the Mac, a cell written =sum, =average or another of its formulas works out the column above it, and the file keeps the formula.
Does the converter upload my spreadsheet?
No. Coffee's converter runs in your browser, so the cells stay on your computer.
Does pasting work the same from Google Sheets and Numbers?
Yes. All three copy cells as tab-separated text, and the converter and Coffee's paste handle each of them.