How to Align Columns in a Markdown Table
Alignment lives in the separator row. A colon on the left aligns left, on the right aligns right, and on both sides centres the column.
Direct answer
Markdown table alignment is set by colons in the separator row under the header. `:---` is left, `---:` is right, and `:---:` is centre. Plain `---` leaves the renderer's default, which is usually left. Use the per-column alignment controls in the converter above to write these markers without editing the row by hand.
Open Excel to Markdown converterWhen to use this
- Numeric columns look ragged because they are left-aligned.
- A status or icon column reads better centred.
- You are matching an existing table's style in a docs site.
Steps
- Paste your cells into the converter and check the live output.
- Find the alignment control for each column below the paste box.
- Set money, counts, and dates to right alignment.
- Set short status values to centre alignment if that matches your docs style.
- Press Copy. The separator row now carries the colon markers.
Example conversion
Item Qty Status Widget 12 OK Gadget 4 Low
| Item | Qty | Status | | :--- | ---: | :---: | | Widget | 12 | OK | | Gadget | 4 | Low |
Common mistakes
- Do not add spaces between the colon and the dashes. `: ---` is not valid alignment syntax.
- Do not expect every renderer to honour centre alignment. Most GFM renderers do, but some minimal parsers ignore it.
- Alignment does not pad the raw text. The source stays ragged; only the rendered table changes.
FAQ
- Does alignment change the raw Markdown width?
- No. Alignment markers only tell the renderer how to align cell contents. The plain-text source keeps whatever spacing it had.
- What is the default alignment?
- With plain dashes and no colon, renderers use their default, which is left for left-to-right languages.
- Can different columns use different alignment?
- Yes. Each column has its own segment in the separator row, so each can differ. The converter exposes one control per column.
Related Excel to Markdown guides
How to Paste Excel Cells as a Markdown Table
Copied Excel cells travel as tab-separated text. Paste them into the converter and get a GitHub Flavored Markdown table with the header row and alignment you choose.
Convert Google Sheets Cells to a Markdown Table
Google Sheets copies a selected range as tab-separated text plus an HTML table. Paste either flavour into the converter to get a Markdown table.
Put an Excel Table Into a GitHub README
GitHub renders GitHub Flavored Markdown tables. Convert copied Excel cells to GFM pipe syntax, then paste the result into README.md.
Fix Pipe Characters That Break a Markdown Table
A literal | inside a cell starts a new column and breaks the table. Escape it as \| so the renderer prints the character instead of splitting the row.