Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    How to Make a Table in Markdown (Syntax, Alignment and Pipes)

    Updated December 2026

    Written by the Toolpuffin team. Tools in this guide are tested in the browser.

    Markdown tables use pipes and hyphens, so they stay readable as plain text. Tables are not part of the original Markdown, but GitHub Flavored Markdown and many other tools support them. This guide shows the syntax, how to align columns and what to do with a pipe inside a cell.

    Try the tool: Markdown Table Generator

    The basic syntax

    A table has a header row, a delimiter row of hyphens under it and then the data rows. Pipes separate the columns. The delimiter row decides the number of columns, and the header row has to have the same number of cells.

    On GitHub you must leave a blank line before the table, or it will not render. The pipes at the start and end of each line are optional, but putting them there makes the table easier to read.

    Source: GitHub Docs: Organizing information with tables

    Source: GitHub Flavored Markdown spec

    Aligning columns

    Add colons to the delimiter row. A colon on the left aligns the column left, a colon on the right aligns it right and a colon on both sides centres it. Without colons you get the default alignment.

    DelimiterAlignment
    ---Default
    :---Left
    ---:Right
    :---:Centre

    A pipe or a line break inside a cell

    A pipe would end the cell, so write it as \| to show a pipe. A cell has to stay on one line, so a real line break does not work. Many renderers accept the HTML tag <br> for a line break, but check that yours does.

    Paste a table from a spreadsheet

    Typing a table by hand gets tedious with more than a few cells. Copy the cells from Excel or Google Sheets, paste them into the generator and it builds the table with the columns lined up, the header row set and the alignment you choose.

    Common mistakes

    • No blank line before the table, so it shows as plain text.
    • A delimiter row with a different number of cells than the header row.
    • Forgetting to escape a pipe inside a cell.
    • Expecting block content such as lists or code blocks inside a cell. A table cell holds only inline content.

    More guides