Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Markdown Preview Table SortNew to Visual Studio Code? Get it now.
Markdown Preview Table Sort

Markdown Preview Table Sort

hkrhd

|
1 install
| (0) | Free
Sort tables by column in VS Code's built-in Markdown preview.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Preview Table Sort

日本語

Adds table sorting to VS Code's built-in Markdown preview.

Behavior

  • Click a table header to sort by that column
  • Cycle through ascending, descending, and the original Markdown order with each click
  • Natural sorting places item2 before item10
  • Empty cells always appear last
  • Sort multiple tables independently
  • Does not modify the Markdown source

Requirements

  • VS Code 1.136.0 or later

Known limitations

  • Dates are compared as natural text without inferring their format.
  • Raw HTML tables without both a header and body are not modified.

Development

npm ci
npm run lint
npm test
npm run package:vsix

npm test launches an actual VS Code instance and exercises the built-in Markdown preview end to end.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft