Markdown Table Formatter

Share:

Clean up and align messy Markdown tables, or convert CSV/TSV to Markdown — padded columns, pipe alignment, correct separators. Free, in your browser.

RT-AI-032 · AI Tools

Markdown Table Formatter

Formatted Markdown table

Advertisement
After tool · AD-W1Responsive · Post-tool

How to Use the Markdown Table Formatter

Paste your table

Drop in a misaligned Markdown table from an LLM answer, a README, or a pull-request comment — or paste raw CSV/TSV exported from a spreadsheet. Ragged, half-piped, and uneven rows are all fine.

Pick the input format

Choose Markdown to clean up an existing table, or CSV / TSV to convert delimited data into a Markdown table. The formatter splits each row and discards any stray separator line for you.

Set the alignment

Pick a default column alignment — left, center, or right — and the tool writes the matching separator markers (:---, :---:, ---:) into the second row so every renderer aligns the columns the same way.

Copy the clean table

The output is column-padded with aligned pipes so it reads cleanly even as plain text. Hit Copy and paste it back into your README, docs, issue, or wiki. Everything runs in your browser — nothing is uploaded.

Advertisement
After how-to · AD-W2Responsive

Readable Tables Without the Manual Pipe Counting

Why Markdown tables drift out of alignment

A Markdown table is just text: a header row, a separator row of dashes, and body rows — all delimited by the pipe character |. Renderers like GitHub, GitLab, and most static-site generators don't care whether the columns line up in the raw source; they only need a valid separator row and consistent pipes. That tolerance is convenient when you write, but it means tables decay fast. An LLM emits a table with no padding. A teammate edits one cell and the columns shift. You paste a row from a spreadsheet and the pipes vanish entirely. The rendered output may still work, but the source becomes painful to read and review in a pull request or a plain-text diff.

This formatter restores that source-level readability. It parses every row, measures the widest cell in each column, and pads every cell to that width so the pipes form clean vertical lines. It also rebuilds the separator row to match — and crucially, it writes the right alignment markers. In Markdown, a colon on the left of the dashes (:---) means left-align, colons on both sides (:---:) mean center, and a colon on the right (---:) means right-align. Most people forget which is which, or set the alignment on the wrong row. Pick an alignment here and the correct marker is written into every column for you.

"A Markdown table renders fine misaligned — but it gets reviewed in the raw. Clean source is the difference between a glance and a squint."

Cleaning LLM and spreadsheet output

Two sources produce the messiest tables, and this tool targets both. The first is LLM output: ask ChatGPT, Claude, or Gemini for a comparison and you usually get a compact table with zero padding, sometimes with a missing trailing pipe or an inconsistent cell count across rows. Paste it in as Markdown and the formatter normalises the structure — ragged rows are padded out to a full column count, stray separator lines are dropped, and the whole thing is realigned. The second is spreadsheet output: copying a range out of Excel, Google Sheets, or Numbers gives you tab-separated or comma-separated values with no pipes at all. Switch the input format to CSV or TSV and the same engine converts those rows straight into a properly-piped, padded Markdown table with a separator row — no manual retyping, no hunting for delimiters.

Because everything happens in plain JavaScript in your browser, there is no upload, no account, and no size limit beyond what your machine can hold in a textarea. That matters when the table contains anything you'd rather not send to a server — internal metrics, customer rows pulled from a report, or draft documentation. The tool is also forgiving by design: it never throws away your data on a parse hiccup. Cells that are shorter than the column width are padded, cells that are longer set the new width, and missing cells in a short row are filled with blanks so the column structure stays intact. Paste, pick a format, choose an alignment, and copy — the table is clean before you've finished reading this sentence.

10 Facts About Markdown Tables

01

Markdown tables aren't in the original 2004 spec — they came from GitHub Flavored Markdown and similar extensions.

02

Only the separator row of dashes is structurally required; column padding is purely cosmetic for the source.

03

Alignment is set by colons in the separator: :--- left, :---: center, ---: right.

04

A separator cell needs at least three dashes in most parsers to be recognised.

05

Leading and trailing pipes are optional in GFM — many people omit them and still render fine.

06

To put a literal pipe inside a cell you must escape it as \| or use the | entity.

07

Markdown tables can't span rows or columns — no rowspan or colspan without dropping into HTML.

08

Most renderers ignore extra spaces, so padding for readability costs you nothing in the output.

09

CSV and TSV map cleanly onto Markdown tables — rows become rows, delimiters become pipes.

10

This formatter runs entirely in your browser — your table is never uploaded.

Frequently Asked Questions

  • It cleans up a messy Markdown table — padding every column to a consistent width, aligning the pipes, and rebuilding the separator row with the correct alignment markers. It can also convert CSV or TSV data into a properly formatted Markdown table.
  • Yes. Set the input format to CSV or TSV, paste your delimited rows (for example a range copied out of a spreadsheet), and the tool splits each row on the comma or tab and rebuilds it as a padded, piped Markdown table with a separator row.
  • A colon in the separator row sets column alignment: :--- is left, :---: is center, and ---: is right. Pick a default alignment and the formatter writes the matching marker into every column so renderers align the table the same way.
  • Rows with fewer cells than the widest row are padded with empty cells so the column structure stays intact. Nothing is dropped — the table is normalised to a consistent column count.
  • No. The whole tool runs in plain JavaScript in your browser. Nothing you paste is uploaded to a server, sent to any AI, or saved — so it's safe for internal or sensitive tables.
  • No. Markdown renderers ignore the extra spaces inside cells, so padding only improves the readability of the raw source — the rendered table looks identical, just with cleaner source text for diffs and reviews.
  • Yes. Leading and trailing pipes are optional in GitHub Flavored Markdown, so the parser trims them if present and works fine without them. The output always includes them for a tidy, consistent result.
  • Chatbots often emit compact, unpadded tables with inconsistent cell counts or a missing trailing pipe. Pasting that as Markdown lets the formatter normalise the structure, pad the columns, and realign everything into clean, reviewable source.
  • In Markdown a literal pipe inside a cell must be escaped as \| so it isn't treated as a column boundary. If your data has unescaped pipes in CSV/TSV mode, escape them first, since the pipe is what separates columns in the final table.
  • Completely free, with no account or sign-up and no limit on use. It runs entirely in your browser and collects no data.

Related News

You may be interested in these recent stories from our newsroom.

No related news yet for this tool. Our editorial team publishes new pieces every week.

Browse all news →
Advertisement
Pre-footer · AD-W3 728 × 90

75 more free tools

Calculators, converters, security tools — no signup.