Markdown Table Formatter
Format and align Markdown tables so every column lines up. Fixes ragged rows, rebuilds the divider and sets left, centre or right alignment.
What is the Markdown Table Formatter?
Markdown Table Formatter tidies up pipe tables so the raw source is as readable as the rendered output.
- Pads every cell so columns line up in the raw Markdown
- Rebuilds the divider row from :--- , ---: and :---: flags
- Respects escaped pipes and inline code spans when splitting cells
- Fills in missing cells so ragged rows still render
- Compact mode strips padding back to minimum width
- Counts columns, rows and rows that needed padding
How to use the Markdown Table Formatter
- 1
Paste your Markdown table into the input box, or click Load example to see the format.
- 2
Choose Pretty to pad every column to the same width, or Compact for minimal-width output.
- 3
Pick a column alignment, or keep the alignment already set in the table's divider row.
- 4
Copy the formatted table or download it as a .md file.
About the Markdown Table Formatter
Markdown Table Formatter tidies up pipe tables so the raw source is as readable as the rendered output. Paste a messy table and every cell is padded to its column width, the divider row is rebuilt from your alignment flags, and rows with missing cells are filled out so the table still renders correctly.
It is built for anyone writing README files, documentation, GitHub issues or static-site posts by hand. Escaped pipes and inline code spans are respected, so a cell containing a backtick expression or a literal pipe will not be split in the wrong place.
Everything runs 100% locally in your browser. Your table is never uploaded to a server, which keeps internal documentation private and lets the tool work offline once the page has loaded. The output is plain Markdown you can paste straight back into your editor, and because padding is invisible to renderers you can reformat as often as you like without changing how the published table looks.
Frequently asked questions
How do I align a column to the right in a Markdown table?
Put a colon at the end of that column's divider cell, like ---: for right or :---: for centre. This tool reads those flags and can also apply one alignment to every column at once.
Why does my Markdown table not render properly?
The most common causes are a missing divider row of dashes under the header, or rows with a different number of cells than the header. This formatter adds the divider and pads short rows so the table renders.
Can a Markdown table cell contain a pipe character?
Yes, but it has to be escaped as a backslash followed by a pipe, or wrapped in backticks as inline code. The formatter recognises both and will not split the cell at that point.
Does column padding change how the table looks when rendered?
No. Extra spaces inside cells are ignored by every Markdown renderer, so padding only affects the readability of the raw source. Compact mode is there if you prefer smaller diffs.
Is my table uploaded anywhere?
No. The formatting runs entirely in your browser with JavaScript, so nothing is sent to a server and the tool keeps working with no internet connection.
Related tools
Text Column Aligner
Line up messy text into neat columns. Split on whitespace or a delimiter and align left, right, centre or on the decimal point.
Markdown to BBCode Converter
Convert Markdown to BBCode for forums, or BBCode back to Markdown. Handles bold, italic, links, images, lists, quotes and code blocks.
Markdown Link Extractor
Extract every link from Markdown into a table of anchor text, URL and title. Splits internal from external and flags duplicates and empty anchors.
HTML Formatter
Format HTML online with clean, consistent indentation. This HTML formatter handles void elements and preserves pre, script and style exactly. Free and private.
Sort Lines
Sort lines of text alphabetically A to Z or Z to A, by length, numerically, or shuffle randomly. Options to ignore case and remove duplicates.