Markdown Table Formatter

Paste a messy Markdown table, get back clean, evenly padded columns. Alignment markers, escaped pipes and uneven rows are handled, so your README or docs diff stays small.

Loading converter…

Before & After Formatting Example

Formatting only changes spacing. Your cell content stays the same.

Input: Messy Markdown Table

|Product|Price|Rating|
|:--|--:|:-:|
|Laptop|$999|4.8|
|Phone|$799|4.7|
|Wireless Headphones|$149|4.5|

Output: Formatted Markdown Table

| Product             | Price | Rating |
| :------------------ | ----: | :----: |
| Laptop              |  $999 |  4.8   |
| Phone               |  $799 |  4.7   |
| Wireless Headphones |  $149 |  4.5   |
Notice that the :--, --: and :-: markers decide how each column is padded: left, right and centered.

How to Format a Markdown Table

  1. Paste your table

    You can paste a single table or a whole .md document.

  2. Check the output

    Columns are padded to the widest cell, and the separator row is rebuilt to match.

  3. Copy or download

    Paste the result back into your README, wiki or docs.

What the Formatter Fixes

Each row below is something the formatter changes. Anything not listed is left as you wrote it.
Problem in your tableWhat the formatter does
Ragged columns, pipes not lined upPads every cell to the widest value in its column
Separator row too short or too longRebuilds it to match the column widths
Alignment markers (:---, :---:, ---:)Keeps them and pads cells to match
Missing leading or trailing pipesAdds them so every row has the same shape
Rows with fewer cells than the headerFills the gaps with empty cells
Rows with more cells than the headerKeeps every cell and adds empty header columns for them
Text outside tables, and tables inside code fencesLeft unchanged

Edge Cases That Break Tables

These are the cases that usually make a table render wrong or look misaligned.

Pipe characters inside a cell

An unescaped | ends the cell, so everything after it shifts into the next column. Escape it with a backslash. GitHub Flavored Markdown applies the escape even inside inline code, and the formatter keeps \| as cell content.
A pipe inside backticks still splits the column. Use \| even inside inline code.
| Command  | Meaning        |
| :------- | :------------- |
| `a \| b` | a piped into b |

Rows with too many or too few cells

A row with fewer cells than the header is filled with empty cells. A row with more cells keeps every cell: the formatter adds empty columns to the header and separator row (the new columns have no alignment). GitHub on its own ignores extra cells, so after formatting those cells become visible. Check those rows before you publish.
Input:
| A | B |
|---|---|
| 1 |
| 2 | 3 | 4 |

Output:
| A   | B   |     |
| --- | --- | --- |
| 1   |     |     |
| 2   | 3   | 4   |

Line breaks inside a cell

A table row must stay on one line. Use <br> for a line break; the formatter leaves it untouched.
| Step  | Detail                      |
| :---- | :-------------------------- |
| Setup | Install the CLI<br>Run init |

Emoji and CJK characters

Chinese, Japanese and Korean characters, and most emoji, take two columns in a monospace editor. The formatter pads using display width, not character count. Complex emoji sequences (family or profession emoji joined with zero-width joiners) are measured inconsistently by many tools, so they can still look off.
| 名前   | Status |
| ------ | ------ |
| 日本語 | ✅     |

Proportional fonts

If the formatted table still looks uneven in your editor, the table is usually fine. Raw Markdown only lines up in a monospace font (Fira Code, JetBrains Mono, Consolas). The rendered table is not affected either way.

Tables pasted from ChatGPT, Notion or Excel

AI chat output often has uneven padding, a missing separator row, or pipes inside values. The formatter does not add a missing separator row. Without one, the text is not recognised as a table and the tool shows "Paste a Markdown table with a header row and separator (---) first." Put a | --- | --- | row under the header, then format, and spot-check any cell that contained a |.
| Name | Role |
| --- | --- |
| Ana | Dev |

Formatter or Generator?

Table FormatterTable Generator
You start withA Markdown table you already haveNothing, or CSV/spreadsheet data
It doesCleans spacing and alignmentBuilds a new table in a grid
Pick it forREADME and docs cleanupWriting a table from scratch

Starting from scratch? Use the Markdown Table Generator. Starting from a spreadsheet? Try Excel to Markdown Table or CSV to Markdown Table.

Frequently Asked Questions

  1. 1

    Does it keep my column alignment (:---, :---:, ---:)?

    Yes. Left, center and right markers are kept, and the cells are padded to match.

  2. 2

    How do I put a | inside a cell?

    Write \|. Without the backslash, the pipe is read as a column separator and the rest of the row moves one column over.

  3. 3

    What happens to rows with a different number of cells?

    Short rows are filled with empty cells. Rows with extra cells keep them, and the formatter adds empty columns to the header and separator to fit. GitHub alone would ignore those extra cells, so check long rows before publishing.

  4. 4

    Can I put a line break in a table cell?

    Use <br>. A literal line break would end the row, because table rows must stay on one line.

  5. 5

    Why do my columns still look uneven after formatting?

    Your editor is probably using a proportional font, or the table has emoji or CJK characters. Check it in a monospace font.

  6. 6

    Is my table sent to a server?

    No. Formatting runs entirely in your browser, and your table is never uploaded.

  7. 7

    Does it format tables inside code blocks?

    Fenced code blocks (``` or ~~~) are left as they are. Indented code blocks are not skipped.

People also convert

Need the syntax itself? See Markdown Tables and GitHub Flavored Markdown.

Last updated: Category: Markdown Table Tools