Tools / CSV Sort & Group
CSV Sort & Group
Drop a CSV and sort it by one or more columns. Add as many sort keys as you need, pick ascending or descending per key, and optionally group rows by a column so rows with the same value stay together.
Drop a CSV or TSV file here, or click to select.
.csv, .tsv, .tab · Max 500 MB
How to use CSV Sort & Group
Drop your CSV
Drag a .csv or .tsv file onto the dropzone. PapaParse parses it in your browser — nothing is uploaded.
Pick sort keys in order of precedence
The first key is the primary sort, the second breaks ties, and so on. Add as many keys as you need with the + Add sort key button, pick ascending or descending per key, and use the arrow buttons to reorder them.
Optional: group by a column
Turn on Group by to keep every row that shares a value in that column adjacent in the output. The group column becomes the implicit primary sort; your ordered keys break ties within each group.
Review the live preview
The virtualized DataTable shows the sorted result as you change keys. Group counts are shown above the table when grouping is on.
Download the sorted CSV
Click Download sorted CSV to save the result. Column order is preserved from the original file; only row order changes.
Frequently asked questions
Related tools
Build a visual filter pipeline with AND/OR logic, pick columns, sort, and export.
Remove duplicate rows from a CSV. Pick which columns to compare and what to keep.
View and explore CSV files with sorting, filtering, and column type detection. Handles 100k+ rows.