HTML table to Markdown converter

Paste <table> code from a page or editor and get an easy-to-edit GitHub-flavoured Markdown table.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter html table code and pad columns to equal width.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Rows (<tr>) and cells (<th>, <td>) are read from the first table, tags are stripped and entities decoded, then the first row is written as the header followed by a --- row; | becomes \| and line breaks become <br>.

Example

Inputs: Pad columns to equal width = yes. Result: Markdown table: | product | price | | ---------- | ----- | | Tea & mint | 12.5 | | Coffee | 18 |; Rows: 3; Columns: 2.

<table>
  <tr><th>product</th><th>price</th></tr>
  <tr><td>Tea &amp; mint</td><td>12.5</td></tr>
  <tr><td>Coffee</td><td>18</td></tr>
</table>
| product    | price |
| ---------- | ----- |
| Tea & mint | 12.5  |
| Coffee     | 18    |

Limits and caveats

  • Merged cells have no Markdown equivalent and are read as one cell.
  • Links, images and bold text become plain text.

Questions about this tool

What if the table has no <th> cells?

The first row becomes the header, because Markdown requires one.

Are multi-line cells kept?

Yes. Each <br> stays as <br> inside the cell, which GitHub shows as a new line.

Do I need to paste the whole page?

No. The table code, or even just the <tr> rows, is enough.