CSV Column Sorter — Sort spreadsheets by column priority

Upload CSV, choose sort order per column, preview, download. Free—runs in your browser.

Sort CSV by multiple columns with priority and per-column rules. Free in your browser.

Upload a CSV file and sort rows by one or more columns. Set which column sorts first, pick ascending or descending, and choose string, numeric, or automatic comparison per column. See a preview of the sorted data and download the full result. Everything runs in your browser.

Chargement de l'outil…

Use it for

  • Spreadsheets — sort by region then by date
  • Data cleanup — numeric columns sorted correctly
  • Exports — reorder before re-importing elsewhere

1. What does this tool do

Upload a CSV file (first row = column headers). Define one or more sort levels (#1 = main sort; #2, #3 only apply when two rows have the same value in the column above). Each level picks a column, ascending or descending, and text, number, auto, or date & time (ISO or Unix epoch). Rows are numbered so priority is clear. After sorting, review the Preview table and download the full CSV. Everything runs in your browser.

2. How to use it

  1. Click Choose CSV file and pick a .csv file (header row required).
  2. Under Sort priority, each row shows #1, #2, … (order = priority). Configure Column, Direction, Compare as. Use Move up / down to change which column sorts first.
  3. Click Add sort level to sort by a second column after the first (each column once).
  4. Click Sort to apply. Review the Preview table.
  5. Click Download sorted CSV to save (UTF-8 with BOM for Excel).

3. How it works

  • Parsing — Uses the same line-based CSV parser as elsewhere on the site: comma-separated fields, quoted fields supported. Multiline cells (newlines inside quotes) are not fully supported.
  • Missing cells — Short rows are treated as empty cells for sorting and export.
  • Stable sort — Equal keys keep their original relative order.
  • Numeric mode — Values that are not valid numbers sort after all numbers (ascending).
  • Date & time modeISO strings beginning with YYYY-MM-DD, or Unix epoch: 10-digit seconds or 13-digit milliseconds (only if the instant falls between 2000 and 2100). Unparseable values sort after all valid instants (ascending).

4. Limits

  • 50,000 data rows maximum (not counting the header).
  • 5 MB file size maximum.

For sorting whole lines or whole CSV rows as one string, use Text Sorter.

Questions fréquentes

Tous les calculs et conversions s'effectuent entièrement dans votre navigateur. Aucune donnée n'est envoyée à un serveur, vos entrées ne quittent jamais votre appareil.