Skip to content

Element Converter

Markdown Table to HTML

Paste a Markdown table to generate a clean HTML <table> instantly. The converter maps pipe-and-dash syntax to <table>, <thead>, <tr>, and <th> elements, preserves column alignment, and outputs copyable HTML.

input.md
FeatureMarkdownHTML
TablesPipe syntax<table>
AlignmentColons in dividertext-align
Header rowFirst row<th>
40 words176 chars HTML 0 B

Key facts

Input syntax
Pipes (|) plus a dash divider row
Output element
<table> with <thead>, <tr>, <th>, <td>
Column alignment
Colons set text-align: left, center, right
Specification
GitHub Flavored Markdown (GFM)

How do Markdown tables convert to HTML?

A Markdown table converts to an HTML <table> element. Pipes (|) become column cell boundaries, the dashed divider row becomes the <thead>, and each content row becomes a <tr> of <td> cells.

Markdown table syntax uses pipes to separate columns and a divider row of dashes to mark the header. The converter parses this structure and emits semantic table markup ready for any web page. For the full syntax rules, see Markdown Tables.

markdown
| Name | Role |
| --- | --- |
| Ada | Engineer |
html
<table>
  <thead>
    <tr><th>Name</th><th>Role</th></tr>
  </thead>
  <tbody>
    <tr><td>Ada</td><td>Engineer</td></tr>
  </tbody>
</table>

How do you align table columns?

Column alignment is set with colons in the divider row. Use :--- for left, :---: for centre, and ---: for right. Each colon maps to a text-align style on the matching HTML cells.

3 alignment options exist: left (:---), centre (:---:), and right (---:). Without colons, columns default to left alignment in the rendered HTML.

markdown
| Left | Centre | Right |
| :--- | :---: | ---: |
| a | b | c |

Are tables part of GitHub Flavored Markdown?

Yes. Tables are a GitHub Flavored Markdown (GFM) extension, not part of the original Markdown spec. This converter enables GFM, so pipe tables render the same way GitHub renders them.

Standard CommonMark does not define tables. The pipe-table syntax originates from GFM and is supported across GitHub, GitLab, and most modern Markdown editors. See GitHub Flavored Markdown for the full extension set.

Where can you use the converted HTML table?

The converted <table> is portable, semantic HTML you can paste into any web page, CMS, or email. It ships unstyled, so add CSS borders, padding, and striped rows by targeting the table, th, and td selectors.

Frequently Asked Questions

How do I align columns in a Markdown table?
Add colons to the divider row beneath the header. Use :--- for left, :---: for centre, and ---: for right alignment. Each colon controls the text-align of that column in the HTML output.
Why is my Markdown table not rendering?
Tables require a divider row of dashes directly below the header and a matching number of pipe-separated cells in every row. A missing divider row or unequal column counts prevents the table from rendering.
Does GitHub Flavoured Markdown support tables?
Yes. Pipe tables are a GitHub Flavoured Markdown extension. This converter enables GFM, so tables convert to HTML exactly as GitHub renders them.
Can I convert an HTML table back to Markdown?
This tool converts Markdown to HTML only. Reverse HTML-to-Markdown conversion is a separate operation and is outside this converter's scope.