A little help goes a long way. Find a tool/

Developer

Markdown Table Formatter

Free markdown table formatter: paste a messy markdown table and get it back with perfectly aligned pipes, consistent separator rows, padding for short rows and optional column alignment.

YOUR WORKSPACEFree to use. No sign-up.
—
Paste a markdown table, then press Format table.

Deep dive guides

A LITTLE CONTEXT · 4 MIN READWhy Markdown Tables Drift Out of Alignment

How markdown table formatter works

Hand-written markdown tables drift out of alignment the moment a cell is edited: pipes stop lining up, separator rows keep their original width, and short rows leave gaps. This formatter parses the table the way GitHub-flavored markdown does — a header row, a separator row of dashes with optional colons, and data rows, each optionally wrapped in pipes with escaped \| supported inside cells — and rebuilds it with every column padded to its widest cell.

The separator row is rebuilt too, so its dash count always matches the column width, and the alignment colons are preserved by default. If you want to change how the table renders, force left, center, or right alignment for every column, or strip the markers entirely. The result is a diff-friendly, consistently aligned table that renders identically on GitHub, GitLab, and any GFM renderer.

The formatter is forgiving about real-world mess. Rows missing a trailing pipe, rows with no enclosing pipes at all, CRLF line endings, and surrounding blank lines are all handled. Short rows are padded with empty cells and rows with more cells than the header keep their extra cells, each case noted in a warning list; if the separator row is missing entirely, an option adds one for you instead of failing.

Frequently asked questions

How is this different from the Markdown Table Generator?
The generator builds a new markdown table from raw delimited data like CSV or TSV. The formatter takes a markdown table that already exists and cleans it up: aligning pipes, normalizing separators, and fixing ragged rows without touching the cell contents.
Are the alignment colons kept?
Yes — with the default "keep existing markers" mode, :---, :---: and ---: are all preserved exactly as they were, only the dash count is normalized to the column width. Choose force left, center or right to override every column, or none to remove the markers.
What about pipes inside cell content?
A literal pipe inside a cell must be escaped as \| in markdown. The formatter understands escaped pipes when splitting rows and preserves them in the output, so cells like "yes \| no" stay intact.
Why did my separator row get longer?
The separator dash count is matched to the width of each column so the whole table lines up in monospace editors — the same convention markdownlint and Prettier use. It still renders exactly the same in GitHub, because any run of at least one dash works.
What happens to rows with missing or extra cells?
Rows with too few cells are padded with empty cells so the table stays rectangular; rows with more cells than the header keep their extra cells rather than silently dropping data. Both cases are reported in the warnings list above the output.