Convert a Markdown Table to an HTML Table
Turn a Markdown pipe table into a full HTML <table> with thead, tbody, and alignment preserved.
Direct answer
Paste a Markdown pipe table and convert it to get a complete HTML <table>: the header row becomes <thead> with <th> cells, each data row becomes a <tr> of <td> cells, and colon alignment in the separator row maps to alignment on the cells.
Open Markdown to HTML converterWhen to use this
- You have a Markdown table and need real HTML table markup.
- You are pasting a table into a CMS or page that expects HTML.
- You need column alignment preserved in the HTML output.
Steps
- Write or paste a Markdown pipe table with a header, a dash separator row, and data rows.
- Add colons in the separator row for alignment (:--- left, :---: center, ---: right).
- Convert to HTML.
- Confirm the header became <thead>/<th> and rows became <tbody>/<td>.
- Copy the <table> markup into your page, then style it with CSS.
Example conversion
| Plan | Price | Seats | | :--- | :---: | ---: | | Free | $0 | 1 | | Pro | $9 | 5 |
<table> <thead> <tr> <th style="text-align:left">Plan</th> <th style="text-align:center">Price</th> <th style="text-align:right">Seats</th> </tr> </thead> <tbody> <tr> <td style="text-align:left">Free</td> <td style="text-align:center">$0</td> <td style="text-align:right">1</td> </tr> <tr> <td style="text-align:left">Pro</td> <td style="text-align:center">$9</td> <td style="text-align:right">5</td> </tr> </tbody> </table>
Common mistakes
- Every row must have the same number of pipes as the header, or the table will not convert cleanly.
- The dash separator row is required; without it the block is treated as plain paragraphs, not a table.
- The HTML table is unstyled — add borders, padding, and spacing with CSS for a finished look.
FAQ
- How do I convert a Markdown table to an HTML table?
- Paste the pipe table into the converter and convert. The header row becomes <thead> with <th> cells and each data row becomes a <tr> of <td> cells.
- Does column alignment carry over to the HTML?
- Yes. Colons in the Markdown separator row map to text-align on the resulting <th> and <td> cells.
- Why won't my Markdown table convert?
- Usually a missing dash separator row under the header, or rows with a different pipe count than the header. Fix both and reconvert.
Related Markdown guides
Related Markdown to HTML guides
How to Convert Markdown to HTML
Convert Markdown into clean, semantic HTML — headings, paragraphs, lists, links, and emphasis — ready to paste into a page or CMS.
Convert a README to an HTML Page
Turn a README.md into a standalone HTML page you can host, preview, or embed — headings, code blocks, and tables intact.
Markdown to HTML for Email Newsletters
Convert Markdown into HTML for email newsletters, then inline the styles so it renders in Gmail, Outlook, and Apple Mail.
Markdown to HTML With Inline CSS and Styling
Convert Markdown to HTML and wrap it in styles — inline CSS or a stylesheet — so the exported page looks designed, not raw.
Embed HTML in Markdown (and When to Mix Them)
Use raw HTML inside Markdown for things Markdown can't express — collapsible sections, keyboard keys, subscript — and know when not to.
Markdown to HTML: CLI vs Online Converter
When to use a command-line tool like pandoc or markdown-it versus a fast, no-login online Markdown to HTML converter.
Desk gear for long writing sessions
A few things that help if you write docs, tickets, and specs on a laptop all day.
Anker 5-in-1 USB-C Hub
One cable turns a laptop into a desk setup. Drives a 4K display, charges at up to 85W, and adds three data ports.
- 4K HDMI output
- 85W max power delivery
- 1x USB-C + 2x USB-A, 5Gbps each
- MacBook Pro, MacBook Air, Dell
Dell 27" S2725QC 4K
The monitor I write and review documents on. 163 PPI keeps small text sharp, and USB-C carries video and power on one cable.
- 3840x2160 IPS, 163 PPI
- 120Hz, 4ms, FreeSync Premium
- 99% sRGB
- USB-C, HDMI, DisplayPort
Apple MacBook Neo 13" (A18 Pro)
The cheapest way into an Apple-silicon machine that runs local models. Fanless, and the Liquid Retina panel holds small text at a full day of reading.
- A18 Pro chip, built for Apple Intelligence
- 8GB unified memory, 256GB SSD
- 13-inch Liquid Retina display
- 1080p FaceTime HD camera
Amazon affiliate links. We earn a commission on qualifying purchases at no extra cost to you.