MARKDOWN TABLES

Fix a Markdown table without guessing its data

A Markdown table needs a header, a separator row and consistent cell boundaries. Spacing makes the source easier to read, but data integrity matters more than a perfectly aligned set of pipes.

Have some text ready to go?

Open Markdown Table Formatter ↗

Start with one table

Paste only the table, without surrounding paragraphs or blank lines. The first row becomes the header. If a separator row is missing, Textidy adds one. Short separator markers and inconsistent padding are normalised.

This tool expects pipe-delimited Markdown. It does not import CSV or interpret a multiline cell. Tables can contain up to 100 columns and 2,000 data rows, subject to the input and output size limits.

Separator restored and source spacing aligned

MARKDOWN

| Task|Owner|
| Review copy |Sam|
| Check links|Alex |

FORMATTED MARKDOWN

| Task        | Owner |
| ----------- | ----- |
| Review copy | Sam   |
| Check links | Alex  |

Preserve or choose column alignment

Keep existing preserves alignment indicated by colons in the separator row. Choose Left, Centre or Right to set the same alignment across columns. The source is padded for readability, with padding capped for very long cells.

Use Preview table to inspect the rendered structure. It uses the same sanitized Markdown renderer as Textidy’s formatted-text tool. Copy Markdown exports the source, not the rendered preview.

Treat uneven rows as a question

A row with more or fewer cells than its header stops formatting. Check the row in the original input. An extra pipe might be a literal character that needs escaping, or the row might genuinely contain an extra value.

Fill missing cells with blanks is an explicit option for short rows. It adds empty cells at the end; it does not infer missing values or their intended column. Extra cells are never silently removed.

Check a failing row without losing a value

For a table with Name and Count headers, the row A | 2 | extra contains three values. Formatting stops instead of throwing the third value away. Decide whether the source needs a third heading or an escaped literal pipe.

Blank-cell padding only fills missing cells at the end of a short row. It cannot know that a value belongs in a later column. Review the source before enabling this option.

Keep pipes inside a cell

A literal pipe inside a Markdown cell needs an escape so it is not read as a new column. Textidy keeps escaped pipes and escapes unescaped pipes inside complete backtick code spans when formatting.

An unescaped pipe in ordinary prose remains a column boundary. When that makes a row uneven, edit the original to show what you intended. Tables with more complex Markdown or ambiguous boundaries need manual review.

References: GitHub Flavored Markdown table specification

Try the behaviour yourself

Restore a missing separator

The first row is the header. A missing separator and uneven spacing are repaired without adding cell values.

Input

| Name|Count |
| A|2|

Expected text output

| Name | Count |
| ---- | ----- |
| A    | 2     |
Try this example in the tool →

Extra data must not disappear

Three data cells under two headings stop conversion. Correct the source; extra cells are never discarded.

Input

| Name | Count |
| A | 2 | extra |

Expected behaviour

Conversion stops: correct the uneven row before copying.
Try this example in the tool →

A pipe inside code

A pipe inside a complete code span is escaped for a GFM table. An unescaped pipe in ordinary text is still a cell boundary.

Input

| Value |
| `a|b` |

Expected text output

| Value  |
| ------ |
| `a\|b` |
Try this example in the tool →

Put it into practice.

Your next paste can be a little simpler.

Try Markdown Table Formatter ↗