Markdown Table Formatter
Paste a messy Markdown table and get a clean one back. Columns are padded to an equal width, the separator row is rebuilt, and pipes get single spaces, so the raw Markdown is easy to read and diff. Alignment markers are kept by default.
How to format a Markdown table
- Paste your Markdown table, including the header and separator (dashes) rows.
- Leave alignment on Preserve to keep each column's markers, or force left, right, or center.
- Copy the aligned Markdown or download it as a table.md file.
Examples
Align a messy table
|a|b| |-|-| |longvalue|2|
| a | b | | --------- | --- | | longvalue | 2 |
Preserve per-column alignment markers
| L | C | R | | :-- | :-: | --: | | a | b | c |
| L | C | R | | :-- | :-: | --: | | a | b | c |
Frequently asked questions
What does formatting a Markdown table do?
It lines up your columns. Each cell is trimmed, every column is padded to the width of its widest value, and the separator row is rebuilt with matching dashes. The rendered table looks the same, but the raw Markdown is readable and produces cleaner diffs.
Does it keep my column alignment?
Yes. With alignment set to Preserve, the tool reads the markers in your separator row and keeps them: :-- stays left, --: stays right, and :-: stays centered. You can also force one alignment for every column.
What input does it expect?
A GitHub Flavored Markdown table: a header row, a separator row of dashes like | --- | --- |, then your data rows. Leading and trailing pipes are optional. If the separator row is missing, the tool reports an error instead of guessing.
What happens to escaped pipes in a cell?
A literal pipe written as \| stays inside its cell and does not start a new column, so code and text that contain pipes survive the reformat unchanged.
Why are short columns padded to three characters?
A separator needs at least three dashes to be valid Markdown, so single-character columns are widened to three. This keeps the syntax correct and the columns aligned everywhere the table renders.
Is my data private?
Yes. The whole table is formatted in your browser and nothing is uploaded to a server, so your data never leaves your device.
Related tools
Markdown Table Generator
Turn CSV or TSV data into a clean Markdown table online. Paste rows, pick column alignment, then copy GitHub-ready Markdown. Free and private.
Sort Lines
Sort lines of text alphabetically or numerically online. Reverse the order, ignore case, and remove duplicate lines, then copy the result. Free and private.
Remove Extra Spaces
Remove extra spaces from text online. Collapse double spaces and tabs to one, trim every line, drop blank lines, then copy or download. Free and private.
Add Line Numbers
Add line numbers to any text online. Set the start value, step, and separator, pad numbers to align, and copy or download the result. Free and private.
Bullet List Maker
Turn lines of text into a bullet or numbered list online. Pick dash, asterisk, dot, arrow or numbers, add indent, then copy. Free and private.
Caesar Cipher
Encode and decode text with the Caesar shift cipher. Pick any shift, see the result live, and brute force all 25 shifts. Runs entirely in your browser.