Copy Excel to Markdown Table (and vice versa)

4 months ago 15

Easily create Markdown tables by copying data from Excel or Google Sheets and pasting it into the text box below using Ctrl+V. Alternatively, as a new feature, paste a Markdown table to convert it to Excel/Google Sheets format.

The result is automatically copied to your clipboard and ready to use.

Additional Excel to Markdown Table Notes

  • This tool is privacy respecting 🔒 since it is written solely in client-side JavaScript. All text processing happens directly in your browser on your local system, ensuring your data remains private.
  • There’s no need to clear the text box for repeated use. Simply paste new content. The old results will be cleared, and the new output will be displayed in the text box and also copied to your clipboard.
  • The original version of this tool (Excel to Markdown) was made possible by Jonathan Hoyt’s innovative copy-excel-paste-markdown code. I have since expanded the code to also convert from Markdown to Excel, but I am indebted to Jonathan for his excellent work.
  • If your table is wide, the rightmost columns may not be visible in the text box. You can scroll horizontally in the text box to see these columns.
  • See also my HTML Bullet Maker tool for converting text into HTML unordered (<ul>) lists.
  • Check out my article on using Markdown with Visual Studio Code if you are looking for a good Markdown editor.

Column Alignments

You can optionally specify column alignment information by prepending one of the following to the column heading names in Excel:

  • ^c – center alignment
  • ^r – right alignment
  • ^l – left alignment (the default)

For example: enter the following in Excel to right-align the second column and center-align the third column:

animal^rweight^ccolor
dog30lbtan
dog85lbblack
cat18lbcalico

This will produce the following markdown table when pasted:

| animal | weight | color | |--------|-------:|:------:| | dog | 30lb | tan | | dog | 85lb | black | | cat | 18lb | calico |

Enjoy!

Follow @thisDaveJ (Dave Johnson) on X and subscribe to my RSS feed to stay up to date with my latest tech articles, tutorials, and guides.

Updated May 29, 2025. Originally published May 8, 2025

Read Entire Article