Markdown Table Sorter
Sort a Markdown table by any column: numbers, prices, dates, file sizes and versions sort by value, not as text.
Paste cells from Excel or Google Sheets into the first header to replace the table · Tab / Enter / arrows move · Shift+F10 opens row & column actions
How to sort a Markdown table in 3 steps
Paste the table
Press Ctrl+V (⌘V) anywhere on the page outside a text box, or paste into the Markdown tab. The table opens in the grid.
Click a column to sort
Click a column header in the grid (or its pill under Options): once for ascending, twice for descending, a third time to restore the original order.
Copy the sorted Markdown
The output updates immediately. Copy it, or open Options for multi-column sorting, deduplication and where blank cells go.
Example
| Package | Version | Size | | :-- | :-: | --: | | react | v18.3.1 | 6.4 KB | | lodash | v4.17.21 | 1.4 MB | | zod | v3.9.0 | 512 KB | | next | v15.1.7 | 120 MB | | Total | — | 121.9 MB |
| Package | Version | Size | | :------ | :------: | -------: | | next | v15.1.7 | 120 MB | | lodash | v4.17.21 | 1.4 MB | | zod | v3.9.0 | 512 KB | | react | v18.3.1 | 6.4 KB | | Total | — | 121.9 MB |
Options explained
- Column header / column pills
- Sorts by that column. Each pill shows the detected type (Num, $, Bytes, Date, SemVer, Bool, Nat, Text) so you can see how it will sort.1st click ascending ▲ · 2nd descending ▼ · 3rd original order
- Multi-Column Sort
- Sort by a primary column, then break ties with more levels (for example Category, then Price). Each level can force a type and direction; click Apply Multi-Column Sort.Auto-Detect · Natural · Numeric · Currency · Bytes · Date / Time · Semantic Version · Checkbox / Status · Text · Text Length
- Pin Summary / Total Row
- Keeps a last row whose first cell starts with Total, Sum, Summary, Average, Avg or Overall at the bottom when sorting, reversing or shuffling.On by default
- Deduplicate Rows
- Drops repeated identical rows while sorting.Off by default
- Case Sensitive
- When on, uppercase and lowercase letters sort separately; when off, “apple” and “Apple” sort together.Off by default
- Blanks
- Where rows with an empty cell in the sort column go, in either direction.Bottom (default) · Top
- Reverse / Shuffle
- Reverse flips the current row order; Shuffle randomizes it (useful for draws and sample data). Both respect the pinned total row.
- Sort Cols (A-Z)
- Reorders the columns alphabetically by header name, moving each column’s data with it.
- Reset Order
- Restores the row order the table had when you loaded it.
Related tools
Also useful
Next steps
- Markdown Table FormatterAlign columns and pad cells so the raw table is readable.
- Markdown Table ValidatorFind broken delimiter rows, column mismatches and unescaped pipes.
- Markdown Table TransposeSwap rows and columns.
- Markdown Table EditorPaste an existing Markdown table and edit cells visually.
- Markdown Table to ImageRender the table as a PNG or SVG for slides and posts.
Convert Markdown to…
- Markdown Table to CSVExport a Markdown table as RFC 4180 CSV.
- Markdown Table to TSVCopy as tab-separated values that paste cleanly into Excel and Sheets.
- Markdown Table to HTMLExport semantic <table> markup.
- Markdown Table to JSONExport rows as an array of JSON objects.
- Markdown Table to LaTeXExport LaTeX tabular code for papers and Overleaf.
Convert to Markdown from…
- CSV to Markdown TableConvert CSV text or .csv files, including quoted cells.
- Excel to Markdown TablePaste cells copied from Excel straight into a Markdown table.
- Google Sheets to Markdown TablePaste a copied range or a public sheet URL.
- TSV to Markdown TableConvert tab-separated text into a Markdown table.
- HTML Table to MarkdownConvert <table> markup into a Markdown table.
About this tool
Reordering rows by hand in a Markdown file is slow and easy to get wrong, and a plain text sort puts $1,097 before $129 and 1.5 GB before 250 MB. Paste the table here and click a column: the sorter works out whether it holds numbers, prices, dates, file sizes or version numbers and sorts by value. A Total row stays at the bottom, and you can sort by several columns at once.
- Detects numbers, currency, dates, file sizes, versions and booleans
- Natural order: item2 sorts before item10
- Multi-column sorting with per-level type and direction
- Keeps a Total or Summary row pinned at the bottom
- Blanks first or last; optional case-sensitive text order
- Reverse, shuffle and alphabetize columns
- Undo any sort with Ctrl/⌘+Z
Technical details
How values are compared
Before sorting, the sorter looks at every non-empty value in the column and picks the most specific type that fits all of them. A column of $129.99 and $1,097.48 sorts as money and 1.5 GB comes after 250 MB, where a plain text sort would put “$1,097.48” first and “1.5 GB” before “250 MB”.
- Numbers and currency: Symbols such as $, € and £, thousands separators and units like /mo are ignored for comparison, and (100.00) counts as negative. The cell text is not changed.
- File sizes: KB, MB, GB, TB and the binary units (KiB, MiB, GiB…) are converted to bytes before comparing.
- Dates: Only real date formats count: ISO (2025-01-15, with an optional time), d/m/y or m/d/y with / . or - separators, and month names (Jan 5, 2025; 5 January 2025; 05-Jan-2025). Text such as “Room 5” is not a date. A column is read day-first when any value has a first number above 12 (15/01/2025), otherwise month-first.
- Versions: v1.10.0 sorts after v1.9.0, and pre-release tags follow SemVer: 1.0.0-beta.2 comes before 1.0.0-beta.10, which comes before 1.0.0.
- Text: Natural, case-insensitive order by default, so “Item 2” comes before “Item 10”.
- Stable order: Rows with equal values keep their relative order, so a multi-level sort is predictable.
Common problems and fixes
Numbers are sorting like text (1, 10, 2)
Cause: At least one cell in the column is not a number (a note, a dash, “n/a”), so the column was detected as text.
Fix: Clear or fix the odd cell, or open Multi-Column Sort and set the level’s type to Numeric.
The total row moved
Cause: Its first cell does not start with the whole word Total, Subtotal, Grand total, Sum, Summary, Average, Avg or Overall (“Summer sale” does not count), or Pin Summary / Total Row is off.
Fix: Rename the label (for example “Total”) or move the row back with Alt+↑/↓ in the grid.
Dates are in the wrong order
Cause: A day/month date such as 05/01/2025 is ambiguous. The column is read day-first only if some value has a first number above 12 (31/01/2025); otherwise it is read month-first.
Fix: Use YYYY-MM-DD dates; they sort correctly both as dates and as text.
Frequently asked questions
How do I sort a Markdown table by a column?
Paste the table on this page and click the column header in the grid: once for ascending, twice for descending, a third time to undo the sort. Then copy the Markdown from the output. Markdown itself has no sort syntax, so the rows have to be reordered in the source.
Why do numbers sort as 1, 10, 2?
That is a text sort. This sorter detects numeric columns and compares values, so 2 comes before 10. If one cell in the column is not a number (a note or “n/a”), the column is treated as text; fix that cell or force Numeric in Multi-Column Sort.
Can I sort by more than one column?
Yes. Open Options, click + Multi-Column Sort, choose the primary column and add levels for tie-breakers, each with its own direction and type, then click Apply Multi-Column Sort.
Will my total row stay at the bottom?
Yes, if its first cell starts with the whole word Total, Subtotal, Grand total, Sum, Summary, Average, Avg or Overall (bold **Total** also counts; “Summer sale” does not) and Pin Summary / Total Row is on, which it is by default.
How are dates sorted?
Columns where every value is written as a date (ISO 2025-01-15, 15/01/2025 or 01/15/2025, or with month names like Jan 5, 2025) are sorted chronologically. A numeric day/month column is read day-first when some value has a first number above 12, otherwise month-first; text like “Room 5” is never a date. ISO dates are always unambiguous.
Can I sort columns instead of rows?
Yes. Sort Cols (A-Z) in Options puts the columns in alphabetical order by header, moving their data with them. To move one column, use the ▾ menu on its header in the grid.
Does sorting change alignment or formatting?
No. Alignment colons and cell content, including bold, links and code, stay as they were; only the row order changes. Undo any sort with Ctrl+Z (⌘Z).
Is my table uploaded?
No. Sorting runs in your browser; the table is not sent to a server.