Markdown Table Generator
Create and customize Markdown tables with live preview
Table Editor
Live Preview
Table preview will appear here...
Markdown tables are the standard way to put rows and columns into a README, a pull request description, or a documentation page. The catch is that the syntax is unforgiving: every row must match the header, and one stray pipe can silently break the whole block. This generator gives you a spreadsheet-style grid to type into and writes correct pipe syntax as you go.
The Three Parts of a Pipe Table
Every pipe table is three stacked blocks:
- A header row, for example
| Method | Safe | Idempotent | - A separator row, which is required and must be the second line:
|:---|:---:|---:| - Zero or more data rows:
| GET | Yes | Yes |
The separator row is what tells the parser “this is a table” instead of a paragraph of text. Each cell in that row controls the alignment of its column:
| Marker | Alignment | Typical use |
|---|---|---|
:--- | left | text, names, labels |
:---: | center | short status values, booleans |
---: | right | numbers, currency, counts |
Some renderers accept a bare --- with no colon and treat it as left-aligned. The generator never relies on that: it always writes an explicit :--- for left.
How to Use the Grid
- Set the size. Enter rows (1–20) and columns (1–10), then click Update Grid. Growing keeps the content you already typed; shrinking discards the rows and columns beyond the new size.
- Type into the cells. The grid opens with a small sample table (Name, Age, City) that you can overwrite.
- Choose alignment per column. The dropdown above each column header sets left, center, or right for that column only, so one table can mix all three.
- Copy the result. The Markdown source updates as you type, with a rendered preview underneath. Pipe characters inside a cell are escaped automatically as
\|.
A Worked Example: An HTTP Method Table
Suppose you want three columns — Method, Safe, Idempotent — with the first left-aligned, the second centered, and the third right-aligned. Fill the grid like this:
| Method | Safe | Idempotent |
|---|---|---|
| GET | Yes | Yes |
| POST | No | No |
| PUT | No | Yes |
| DELETE | No | Yes |
The generated source is:
| Method | Safe | Idempotent |
|:---|:---:|---:|
| GET | Yes | Yes |
| POST | No | No |
| PUT | No | Yes |
| DELETE | No | Yes |
Two details are worth noticing. The separator row is written without spaces around the pipes (|:---|:---:|---:|) while the header and data rows use spaces (| GET | Yes | Yes |); both are valid, and the parser treats them identically. And because you typed real values into the grid, the column count is guaranteed to match on every row.
Common Mistakes That Break Rendering
- A row with the wrong number of cells. Most parsers drop the entire table rather than guess which column is missing.
- Leaving out the separator line, or placing a blank line between the header and the separator. The block falls back to ordinary text.
- Using an unescaped
|inside a cell, for example to mean “or”. It creates an extra column and shifts everything after it. - Putting a newline inside a cell. Pipe tables are one line per row; a line break ends the row early.
- Expecting other Markdown characters to be neutralized. The tool escapes pipes only. A cell beginning with
-,#, or>may be interpreted as formatting by the renderer, so avoid those starts when you want literal text.
What Markdown Tables Cannot Do
Pipe tables have no merged cells, no multi-line cells, no captions, and no footnotes, and they cannot nest a list or a fenced code block. Column widths are chosen by the renderer, not stored in the source, so padding cells with spaces has no effect on the final layout. If you need any of those features, build an HTML <table> instead.
Why Hand-Editing Tables Goes Wrong
Once a table leaves the grid, editing it by hand is where mistakes creep in. Consider adding one row to a three-column table:
| Method | Safe | Idempotent |
|:---|:---:|---:|
| GET | Yes | Yes |
| POST | No | No |
Adding | PATCH | No | No | is easy, but a row with only two cells — | PATCH | No | — silently drops the table in most renderers. The same happens with an unescaped pipe used as text: | GET | yes\|no | Yes | only survives because of the backslash.
A second trap is the separator row. People often copy the header row and replace the words with dashes, producing a line with stray spaces or the wrong number of columns. A lenient parser may still render it while a stricter one fails. When in doubt, paste the source back into the grid, adjust, and copy it again rather than editing pipes by hand.
Where the Output Renders
Paste the result into GitHub READMEs, issues, pull requests, and wikis; GitLab and Bitbucket; Stack Overflow and Reddit; Discord and Slack; Notion and Obsidian; Jupyter notebooks; and static site generators such as Hugo, Jekyll, and Astro. Each of these consumes the alignment markers and ignores the padding spaces, so the same source renders cleanly everywhere the extension is supported. Everything runs locally in the browser — your table text is never sent to a server.
Related Tools
Frequently Asked Questions
Why does the separator row use colons, and what does each one mean?
The separator row is required and is always the second line of a table. A colon on the left (`:---`) means left-aligned, a colon on both sides (`:---:`) means centered, and a colon on the right (`---:`) means right-aligned. The generator writes one marker per column based on the alignment dropdown above that column, so the output can mix all three in a single table.
My table shows up as plain text on one site but renders on another. Why?
Pipe tables are not part of the original 2004 Markdown spec; they came from GitHub Flavored Markdown and were adopted unevenly. GitHub, GitLab, Stack Overflow, Notion, Obsidian, and the common static site generators support them. Plain Markdown renderers that never added the extension, and some older wikis, will show the pipes literally. There is no syntax change that fixes that; the destination has to support the extension.
How do I put a literal pipe character inside a cell?
Escape it with a backslash, like `a \| b`. The generator does this automatically: any `|` you type in a cell is written to the output as `\|`, so the renderer treats it as text instead of a column break. Backslashes themselves are not escaped, which matters if your content already contains escape sequences.
Can a cell contain a line break, a bullet list, or a code block?
No. A pipe table is strictly one physical line per row. Newlines inside a cell end the row, and block-level Markdown such as lists or fenced code blocks cannot be nested in a cell. If you need multi-line content, use an HTML table instead of a pipe table.
Do I have to type the outer pipes at the start and end of each row?
Most parsers treat them as optional, but the generator always writes them. Keeping the leading and trailing pipes makes the source easier to read and reduces copy-paste mistakes, and every renderer that understands pipe tables supports the fully delimited form.
Does column alignment change anything other than the text position?
No. Alignment only affects how the renderer positions text within the column; it does not change column width, wrapping, or sorting. Since the source stores no fixed widths, a renderer may still size the column to its content, which is why a right-aligned column does not guarantee the numbers look stacked in every viewer.
Reviewed by the HandyTools Hub team · Last updated