Build Markdown Tables Without Counting Pipes
Markdown tables are simple to read and tedious to write. Getting the pipes and dashes to line up by hand is fiddly, and a single missing separator breaks the whole table. Fill in the grid instead and copy the result. Everything runs in your browser.
How do I set column alignment?
Click the arrow button above a column to cycle it through left, centre, and right. The
alignment is encoded in the separator row using colons: :--- for left,
:---: for centre, and ---: for right. Most Markdown renderers
— GitHub, GitLab, and static site generators — honour these; a few very
minimal ones ignore alignment entirely and left-align everything.
Why is the output padded with spaces?
Because it makes the raw Markdown readable. Every column is widened to fit its longest cell so the pipes line up in a plain text editor, which matters when someone reviews the source in a pull request. The padding is purely cosmetic — renderers ignore it entirely, and a table with no padding at all displays identically.
Can a cell contain a pipe or a line break?
A pipe can, and it is escaped for you as \| so it does not get read as a
column boundary. A line break cannot: Markdown table rows are defined one per line, so
there is no way to put a newline inside a cell. Pasted line breaks are flattened to
spaces. If you need multiple lines in a cell, most renderers accept a literal
<br> tag there.
Does the header row have to have content?
Structurally yes — a Markdown table is defined as a header row, a separator row, and then body rows, so the separator has to follow something. You can leave the header cells empty and the table will still render, just with a blank top row. There is no Markdown syntax for a table with no header at all.
Related tools
To convert an existing HTML table into Markdown, use the HTML to Markdown Converter, which handles tables in both directions. For spreadsheet data, the CSV to JSON Converter is a useful first step.
Last reviewed: August 2026