VS Code Extensions
Markdown Table Formatter - Sort, Format & Edit Tables

Markdown Table Formatter - Sort, Format & Edit Tables

by miccho27

Format Markdown tables in VS Code with aligned columns, sorting, row insertion, column management, and automatic formatting on save

Downloads

118

Rating

— (0)

Version

1.0.0

Last updated

Apr 04, 2026

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