Markdown Table Sorter
Reorder the data rows of a single Markdown pipe table by the value in one column. Pick the column by its header text or by 1-based index, choose numeric or text comparison (auto-detected), and sort ascending or descending. The header and alignment row stay fixed; cells keep their original text. Runs entirely in the browser, so your tables never leave the tab.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
Rows move, everything else stays
Give it a single Markdown pipe table and it returns the same table with only the data rows reordered. The header row and the alignment separator stay exactly where they were, and each cell keeps its original text, so the sole change is the order of the rows beneath them.
Tidying a table you publish as Markdown
It suits tables living in READMEs, changelogs and docs: ranking a benchmark table by milliseconds, ordering a dependency list by version, or putting a score leaderboard back in order after rows were appended by hand at the bottom.
Choosing a column and a comparison
Name the column by its header text, matched without regard to case, or by a 1-based number when the header text is inconvenient. Order flips the direction, and sort type chooses between automatic, forced numeric and text comparison; the case-sensitive flag only affects the text mode.
What auto-detection accepts
Auto compares numerically only when every cell in the column parses as a number, allowing thousands separators and k, m or percent suffixes, and falls back to text otherwise. Rows that compare equal keep their order. Pipes inside backticks and escaped pipes count as cell content, and tables beyond 5,000 rows or 200 columns are refused.
The table stays in the page
Parsing and reordering run in the browser with no upload, so internal figures and identifiers never leave the tab.
Questions
How do I choose which column to sort by?
Enter the header text (matched case-insensitively) or the 1-based column number. Example: column "2" sorts by the second column even if it has no header.
What does Auto sort type do?
Auto compares numerically when every value in the column can be parsed as a number (including 2.7M or 1,200), and falls back to text comparison otherwise.
What stays in place?
The header row and the Markdown alignment separator row are never reordered. Only the data rows between/below them move, and their cell text is preserved exactly.
Is the sort stable?
Yes. Rows that compare equal keep their original relative order, and the comparison happens on trimmed cell values, so the output is deterministic.
Related tools
See categoryMarkdown Table Formatter
Normalize Markdown pipe tables and optionally align their columns.
Markdown Table of Contents
Generate a nested table of contents from Markdown headings, with GitHub-compatible slugs and links.
CSV to Markdown Table
Convert a CSV table into a clean GitHub-Flavored Markdown pipe table with optional alignment.
Sort Lines
Sort lines alphabetically, numerically, by length, naturally, or shuffle them.