</>MDTooltools

Markdown Tables

Create a table in Markdown with pipes (|) separating columns and a row of hyphens under the header. Colons in the separator row control column alignment.

Basic table syntax

The separator row of hyphens is what makes it a table. Outer pipes are optional but make the source easier to read; column widths do not need to line up.

| Tool | Output |
|------|--------|
| MDTool | PDF, HTML, Word |
| Pandoc | Almost anything |

Column alignment

Add colons to the separator row: left (:---), center (:---:), or right (---:).

| Left | Center | Right |
|:-----|:------:|------:|
| a    |   b    |     c |

What can go inside a cell

Inline formatting works: bold, italic, code, links, and images. Block elements do not — you cannot put lists, headings, or multi-line paragraphs in a Markdown table cell. Use <br> for a manual line break inside a cell.

Tables are a GFM extension. Strict CommonMark parsers render them as plain text — one of the most common reasons tables "break" after conversion.

Frequently Asked Questions

How do I merge cells in a Markdown table?

You cannot — Markdown tables have no colspan or rowspan. If you need merged cells, write the table in HTML instead; most renderers accept inline HTML tables.

How do I convert a Markdown table to HTML?

Paste the table into MDTool’s Markdown to HTML converter — GFM tables convert to real <table> markup with thead and tbody. Or build the table in the Markdown Table Generator and switch its output toggle to HTML.

Is there a tool that writes Markdown table syntax for me?

Yes — MDTool’s free Markdown Table Generator gives you a visual grid editor with per-column alignment and Excel/CSV paste import, and outputs the finished table as Markdown or HTML.

Why does my Markdown table break in PDF exports?

Usually the converter’s parser lacks the GFM table extension, or long unbreakable content overflows the fixed page width. MDTool’s PDF converter handles GFM tables natively.

Try it live

Paste this syntax into the free markdown table generator and see the rendered output instantly — no signup, everything runs in your browser.

Open Markdown Table Generator

More Markdown syntax: