Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Markdown Table Formatter - Sort, Format & Edit TablesNew to Visual Studio Code? Get it now.
Markdown Table Formatter - Sort, Format & Edit Tables

Markdown Table Formatter - Sort, Format & Edit Tables

miccho27

| (0) | Free
Auto-format Markdown tables with perfect column alignment. Sort by any column, add/remove columns, and fix misaligned tables instantly. Works on single tables or the entire file. Keyboard shortcut included.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Table Formatter

Auto-format Markdown tables with perfect column alignment. Sort by any column, add/remove columns, and fix misaligned tables instantly.

VS Code Marketplace Installs License: MIT

Features

Auto-Format Tables

Format all tables in a Markdown file with one command. Column content is padded to equal widths for perfect readability in source.

Before:

| Name | Role | Joined |
|---|---|---|
| Alice | Engineer | 2023 |
| Bob | Designer | 2024-01-15 |

After:

| Name  | Role     | Joined     |
| ----- | -------- | ---------- |
| Alice | Engineer | 2023       |
| Bob   | Designer | 2024-01-15 |

Sort by Column

Sort any table's data rows by a selected column — ascending or descending. Numeric values are sorted numerically; text values use natural locale sort.

Add / Remove Columns

Add a new column (with a custom header) or remove any existing column via a quick-pick dropdown.

Insert Row

Insert an empty row below the cursor position inside any table.

Format on Save

Enable mdTableFormatter.formatOnSave to automatically align all tables every time you save a Markdown file.

Commands

Command Keybinding Description
Format All Tables Alt+Shift+F Format every table in the file
Format Table at Cursor Alt+F Format the table under the cursor
Sort Column Ascending — Sort current table ASC by chosen column
Sort Column Descending — Sort current table DESC by chosen column
Add Column — Append a new column to current table
Remove Column — Remove a column from current table
Insert Row — Insert empty row below cursor

All commands are also available via the right-click context menu in any Markdown file.

Settings

Setting Default Description
mdTableFormatter.formatOnSave false Auto-format on save
mdTableFormatter.columnPadding 1 Extra spaces around cell content
mdTableFormatter.alignHeaderSeparator true Align separator row to column width

Installation

  1. Open VS Code
  2. Press Ctrl+P
  3. Type ext install miccho27.markdown-table-formatter
  4. Press Enter

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft