HTML table to Markdown converter
Paste HTML table code, or a table copied from a web page, and get a GitHub Flavored Markdown table with its bold text, links and line breaks kept.
Everything runs in your browser and nothing you paste or open is uploaded.
Converter
| Item | Qty | Price |
| :------- | :-: | -----: |
| Notebook | 2 | $4.50 |
| Pens | 10 | $12.00 || Remove row | |||
|---|---|---|---|
Enter moves down and adds a row at the end. Type <br> for a line break inside a cell. Pipes are escaped for you.
| Item | Qty | Price |
|---|---|---|
| Notebook | 2 | $4.50 |
| Pens | 10 | $12.00 |
Jotura, a free notes app, edits tables like this natively and saves them as the same plain Markdown. Download Jotura
How to use it
- Paste the table. Paste the HTML source, or a table selected and copied on a web page. Opening a
.htmlfile works too. - Shape the table. Set each column to left, center or right, and fix any cell in the grid.
- Copy the Markdown. Copy Markdown puts the table on the clipboard and Download saves it as
table.md.
Questions
How do I convert an HTML table to Markdown?
Paste the HTML into the box at the top of this page, or open a .html file. The converter reads the first <table> it finds, ignores everything around it, and writes a GitHub Flavored Markdown table with the first row as its header.
How do I copy a table from a web page into Markdown?
Select the table on the page in your browser, from the first cell to the last, copy it and paste it into the box. The browser copies the table as HTML along with the text, and the converter reads the HTML, so a Wikipedia table or a table in a documentation page keeps its rows and columns.
What happens to bold, links and line breaks?
<strong> and <b> become **bold**, <em> and <i> become *italic*, <code> becomes backticks and <del> becomes ~~strikethrough~~. Links that start with https://, http:// or mailto: are kept as Markdown links. A <br> or a paragraph break inside a cell becomes <br>. Classes, styles and every other tag are dropped.
| Name | Notes |
| --------------------------- | ---------------- |
| **Pen** | Blue<br>Black |
| [Jotura](https://jotura.io) | *Free* notes app |How are colspan and rowspan handled?
Markdown tables cannot merge cells, so the value stays in the first cell of the merged area and the cells it covered are left empty. Every row ends up with the same number of columns.
What about a table inside a table?
The text of the inner table is kept inside the cell that holds it, with its cells separated by spaces. Only the outer table becomes Markdown. A page with several separate tables gives the first one; paste the HTML of another table on its own to convert that one.
Can I convert an HTML table with pandoc?
Yes. Pandoc reads HTML and writes Markdown tables, and it converts every table in the file. A table with merged cells or several paragraphs in a cell may come out as an HTML block instead of a pipe table.
pandoc -f html -t gfm page.html -o page.mdIs my HTML uploaded?
No. The HTML is read by JavaScript in your browser, without loading any of its images or scripts. Nothing you paste or open is sent to a server or saved.
Other table tools: Markdown table generator, CSV to Markdown and Excel to Markdown. The guide to Markdown table syntax covers alignment, line breaks and where tables render.