Skip to content

Markdown Table Sorter

Sort a Markdown table by any column: numbers, prices, dates, file sizes and versions sort by value, not as text.

Row
1
[x]
2
[x]
3
[x]
4
[ ]
5
[x]
6
[x]
7
[x]
8
Output
| Product Name             | Category    |     Price | Storage |  Version  | Release Date | In Stock |
| :----------------------- | :---------- | --------: | ------: | :-------: | :----------: | :------: |
| Mechanical Keyboard Pro  | Hardware    |   $129.99 |  1.5 GB |  v2.1.0   |  2025-01-15  |   [x]    |
| USB-C Hub Multiport      | Accessories |    $45.00 |  250 MB |  v1.4.0   |  2024-08-20  |   [x]    |
| Ergonomic Vertical Mouse | Hardware    |    $79.50 |  500 KB |  v2.0.1   |  2024-11-10  |   [x]    |
| Cloud Backup Ultra       | Software    |    $19.99 |   10 TB |  v3.0.0   |  2025-02-01  |   [ ]    |
| UltraWide 4K Monitor     | Hardware    |   $649.00 |  4.2 GB |  v1.0.0   |  2024-03-12  |   [x]    |
| Security Key 2FA Dongle  | Accessories |    $25.00 |  128 KB |  v1.10.0  |  2024-09-05  |   [x]    |
| Developer IDE License    | Software    |   $149.00 |  850 MB | v2025.1.0 |  2025-01-30  |   [x]    |
| Total Inventory Value    | Summary     | $1,097.48 | 14.2 TB |     —     |      —       |    —     |
8 rows × 7 columns
Rendered Preview
Product NameCategoryPriceStorageVersionRelease DateIn Stock
Mechanical Keyboard ProHardware$129.991.5 GBv2.1.02025-01-15[x]
USB-C Hub MultiportAccessories$45.00250 MBv1.4.02024-08-20[x]
Ergonomic Vertical MouseHardware$79.50500 KBv2.0.12024-11-10[x]
Cloud Backup UltraSoftware$19.9910 TBv3.0.02025-02-01[ ]
UltraWide 4K MonitorHardware$649.004.2 GBv1.0.02024-03-12[x]
Security Key 2FA DongleAccessories$25.00128 KBv1.10.02024-09-05[x]
Developer IDE LicenseSoftware$149.00850 MBv2025.1.02025-01-30[x]
Total Inventory ValueSummary$1,097.4814.2 TB———

How to sort a Markdown table in 3 steps

  1. 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.

  2. 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.

  3. Copy the sorted Markdown

    The output updates immediately. Copy it, or open Options for multi-column sorting, deduplication and where blank cells go.

Example

Before (Size column, Total row last)
| 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 |
Sorted by Size, descending (Total stays pinned)
| 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.
Browse all 36 tools

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.