Related Tools
What This CSV Sort Tool Offers
Sort CSV by one or two columns with full control: a column selector that shows header names when your file has a header row, ascending or descending per column, numeric or text sort (so numbers order as 1, 2, 10 not 1, 10, 2), and an optional case-sensitive comparison. Preview the result in a table (first 25 rows with sticky header), then download or copy the full sorted CSV. All processing is client-side—no upload to any server.
- Sort by one or two columns: Choose the primary sort column; optionally set a second column (Then by) to break ties. Each level has its own ascending or descending order.
- Column selector with header names: When the first row is a header, the dropdown shows index and name (e.g. 0: Name). Otherwise it shows Column 0, Column 1, etc.
- Numeric or text sort: Numeric sort orders numbers naturally (1, 2, 10). Text sort is alphabetical. Use numeric for date or number columns.
- Case-sensitive option: By default sort is case-insensitive. Enable Case-sensitive to distinguish A from a.
- First row as header: When the first row looks like a header, it is kept at the top and only data rows are sorted.
- Preview table: After sorting, a table shows the first 25 rows with a sticky header and row count; the full CSV is in a textarea below.
- Auto or custom delimiter: Choose Auto to detect the delimiter or pick comma, semicolon, tab, or pipe.
- Encoding for file upload: Select UTF-8, Windows-1252, or ISO-8859-1 when uploading a file.
- Client-side and private: Sorting happens in your browser; nothing is sent to a server.
Why Sort CSV?
Sorting CSV by column orders data by date, name, or value for analysis, import, or reporting. Multi-column sort (Then by) lets you order by category then by name or date. Numeric sort keeps numbers in the right order (e.g. 2, 10, 100 instead of 10, 100, 2). Choosing the right column is easier when the tool shows header names instead of only indices.
Powered by browser APIs and client-side processing.
When to Use Numeric vs Text Sort
Use Numeric when the sort column contains numbers or dates (e.g. IDs, prices, dates). Use Text when the column is purely alphabetical or when you want strict character-by-character order. Numeric sort uses natural ordering so 10 comes after 9.
Options at a Glance
- Sort by column: Primary column (dropdown shows header names when available). Ascending or Descending.
- Then by: Optional second column for tie-breaking. Leave as — to sort by one column only.
- Sort as: Numeric (1, 2, 10) or Text (alphabetical).
- Case-sensitive: When enabled, A and a are ordered separately.
Frequently Asked Questions
Can I sort by two columns?
Yes. Set Sort by column and optionally Then by column with its own Ascending/Descending. Rows are first sorted by the primary column; ties are broken by the second column.
What is Then by column?
Then by is an optional second sort level. When two rows have the same value in the first column, they are ordered by the Then by column. Leave it as — to sort by one column only.
What is Numeric vs Text sort?
Numeric sort orders numbers naturally (e.g. 1, 2, 10 instead of 1, 10, 2). Text sort is alphabetical. Use numeric for columns with numbers or dates.
Does the tool keep the header row?
Yes. When your CSV has a first row that looks like a header, it is kept at the top and only the data rows below are sorted. The preview table shows the header in a sticky row.
What does the column dropdown show?
When your CSV has a header row, the dropdown shows column index and header name (e.g. 0: Name, 1: Date). Otherwise it shows Column 0, Column 1, etc.
What delimiters are supported?
You can use Auto to detect from the first line, or choose comma, semicolon, tab, or pipe.
Is my data secure?
Yes. Sorting runs entirely in your browser. Your data never leaves your device.