# How to Make a Markdown Table (Alignment, Escaping, and Limits)

Tables in Markdown look like text-art: columns separated by pipe characters, with a row of dashes under the header. They're part of GitHub Flavored Markdown and supported by most modern renderers.

## Basic syntax

```
| Name  | Role   | Score |
| ----- | ------ | ----: |
| Ada   | Admin  |    98 |
| Lin   | User   |    87 |
```

- The first row is the header, and the second row of dashes is required.
- Each line is one row, with cells separated by pipes.
- The outer pipes are optional, but including them is clearer.
- Columns don't have to line up in the source, though aligned text is easier to edit.

## Column alignment

- |:---| aligns the column left.
- |:---:| centers it.
- |---:| aligns it right, which suits numbers.

## Special characters

- A literal pipe inside a cell must be escaped as \\|.
- You can use inline formatting inside cells: bold, italic, code, and links.
- Line breaks inside a cell need an HTML &lt;br> tag in most renderers.
- Backticks are handy for code that itself contains a pipe, but escape rules vary.

## What tables can't do

- Merge cells (no colspan or rowspan).
- Hold multi-paragraph content or lists in a cell without HTML.
- Wrap long text nicely in source form; long cells make the raw Markdown hard to read.

For complex layouts, use an HTML table instead; most Markdown renderers accept it.

> **Don't hand-align big tables**
>
> Aligning pipes manually is tedious. A table generator lets you edit a grid and outputs the Markdown, and can convert from CSV or spreadsheet data.

1. Copy the data from your spreadsheet or CSV.
2. Paste it into a table generator and set alignment.
3. Copy the Markdown into your document.
4. Preview it to make sure the header and pipes rendered correctly.

## Frequently asked questions

### How do I align a column to the right in Markdown?

Put a colon at the right end of the dash row for that column, like ---:.

### How do I put a pipe character inside a table cell?

Escape it with a backslash: \\|.

### Can Markdown tables have merged cells?

No. Use an HTML table if you need colspan or rowspan.

### Do all Markdown renderers support tables?

Most modern ones do because tables are part of GitHub Flavored Markdown, but original Markdown doesn't include them.

**Try it:** [Markdown Table Generator](https://markdown.ilovekit.app/table) — free, runs in your browser, nothing is uploaded.

*Originally published at [ilovekit.app](https://ilovekit.app/blog/how-to-make-a-markdown-table).*
