Markdown table to HTML converter
Paste a Markdown table and get <table> code for a web page or a CMS that does not read Markdown.
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
- Enter markdown table and right-to-left table (dir="rtl").
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
The row above the separator becomes <thead> and the rest <tbody>. Colons in the separator row become style="text-align:left|center|right", and & < > " are escaped.
Example
Inputs: Right-to-left table (dir="rtl") = no. Result: HTML code: <table> <thead> <tr><th>product</th><th style="text-align:right">price</th><th style="text-align:right">qty</th></tr> </thead> <tbody> <tr><td>Tea</td><td style="text-align:right">12.5</td><td style="text-align:right">3</td></tr> <tr><td>Coffee</td><td style="text-align:right">18</td><td style="text-align:right">2</td></tr> </tbody> </table>; Rows: 3; Columns: 3.
| product | price | qty | | --- | ---: | ---: | | Tea | 12.5 | 3 | | Coffee | 18 | 2 |
<table>
<thead>
<tr><th>product</th><th style="text-align:right">price</th><th style="text-align:right">qty</th></tr>
</thead>
<tbody>
<tr><td>Tea</td><td style="text-align:right">12.5</td><td style="text-align:right">3</td></tr>
<tr><td>Coffee</td><td style="text-align:right">18</td><td style="text-align:right">2</td></tr>
</tbody>
</table>Limits and caveats
- Markdown formatting inside cells, such as **bold** or links, is not rendered and stays as text.
- One table is read at a time.
Questions about this tool
How is alignment kept?
:--- is left, :---: is center and ---: is right, written on each cell of the column as text-align.
Is <br> inside a cell kept?
Yes. It stays a line break inside the cell in the HTML code.
Does it read tables without outer pipes?
Yes. A row like a | b is read the same as | a | b |.
