Skip to main content

locacsv.comSort CSV Rows by a Selected Column

Sort rows

Sort CSV Rows by a Selected Column

Treat a column as text or numbers and sort it in ascending or descending order. Rows with equal values retain their original order, and processing stays in your browser.

CSV processing stays in your browser

Your files are not uploaded to a server.

File selection

Choose 1 CSV file up to 50 MiB. Its name and contents are never sent outside your browser.

Drag and drop a CSV file here

1 CSV file, up to 50 MiB

Import settings
Auto-detection covers only UTF-8 and Shift_JIS. For CSV files from mainland China, Korea, Taiwan, or Western Europe, select the matching encoding manually.

How it works

Sort amounts from highest to lowest

Treat the Amount column as numbers and sort descending to see the largest values first.

Input example

2 columns · 2 rows
Input example
ProductAmount
Orange850
Apple1200

Output example

2 columns · 2 rows
Output example
ProductAmount
Apple1200
Orange850
The left table shows the input, and the right table shows the output.

Rows with equal values retain their original order.

Sort CSV rows by multiple columns

Sort by up to three text or numeric keys in ascending or descending order.

Features

  • Set type, direction, and case handling for each key.
  • Keep source order for ties and place blanks first or last.

How it works

  1. Choose a CSV and review the target columns.
  2. Set up to three keys, their type, direction, blank position, and priority.
  3. Run, review all columns and the first 100 rows, and download.

Before you start

  • For numeric sorting, remove thousands separators and currency symbols.
  • There is no date parser; use formats whose text and date order match.
View FAQs for this tool

Filter before sorting, or calculate totals with Group & summarize.