Data and JSON tools Free · No sign-up · No upload

CSV Sorter

Sort the rows of a CSV by any column, or several, as text, numbers or dates. Numbers sort as numbers, not as text. Your file stays in your browser.

  • No credit card
  • Never touches a server
  • Multi-column sorting
  • Text, number or date
Your data
Header name or column number; several separated by commas
  • Runs on your device. Files are never uploaded.
  • Free and unlimited. No sign-up, no watermark.
Private: processed in your browserNo upload waitIN: CSV → OUT: CSV
How was CSV sorter?
How it works

CSV sorter in three steps

No account, no email, no waiting for an upload.

  1. STEP 01

    Add your CSV

    Paste text or open a file.

  2. STEP 02

    Choose the column and order

    Type a header name or number. Separate several with commas. Pick ascending or descending.

  3. STEP 03

    Choose how to compare

    Leave 'Detect' on, or force text, numbers or dates. Copy the sorted file.

What you get

What CSV sorter does, and what it doesn't

We'd rather tell you up front than surprise you after the download.

What you get

  • Multi-level sortList several columns and later ones break ties in earlier ones.
  • Smart type detectionA column of numbers sorts numerically, a column of dates chronologically, and anything else as text.
  • Natural text orderText sorts without regard to case, and file2 comes before file10.
  • Currency and thousandsValues like $1,200 are read as numbers when sorting numerically.
  • Blanks go lastEmpty cells stay at the bottom in both ascending and descending order.

Good to know

  • One direction for all columnsAscending or descending applies to every sort column. To mix them, sort twice.
  • Date parsing depends on your browserISO dates like 2024-03-01 are safest. Ambiguous formats like 03/04/2024 may be read as month first.
  • Header is kept on topIf your file has no header, turn the option off so the first row is sorted too.
Private by design

Your data never leave your device

The tool runs inside your browser instead of on our servers, so there is nothing to upload, store or delete afterwards.

Typical online tool upload

Your device→Their server→Your device

Your file travels over the internet, sits on someone else's computer for a while, and you wait for the upload and the download.

Mediaextractr no upload

Your device does all the work

The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.

Made for real work

When people use CSV sorter

Order an export by date

Put the newest or oldest records first.

Rank by a value

Sort sales by amount, highest first.

Prepare a tidy deliverable

Sort by customer, then by date.

Make test data predictable

A stable order makes diffs readable.

Compare

Mediaextractr vs typical upload tools

MediaextractrPrivateTypical upload tools
Your file is uploadedNeverYes
Sign-up neededNoOften, after a few files
Daily file limitNoneOften 1–2 free files
WatermarkNeverSometimes
Wait for upload & downloadNoYes
Speed on very large filesDepends on your deviceDepends on their servers

Text, numbers and dates

Sorted as text, 100 comes before 20 because the first character is compared first. Sorted as numbers, 20 comes before 100. With 'Detect' on, the tool looks at the values in each sort column to choose the right method.

If the column mixes numbers with words, it is sorted as text. Force a method when you know better.

Sorting on several columns

Write the columns in priority order, for example country, city, revenue. Rows are first grouped by country, then by city within a country, and so on.

  • Use column numbers when headers are long.
  • Sort before you remove duplicates with the CSV deduplicator, so the row you want to keep is first.
  • Use CSV column selector to trim columns afterwards.
  • Sorting plain lines of text? Try the text sorter.

Sorting a sample

With the column set to revenue and the order descending, a file with values 900, 1,200 and 85 comes out as 1,200, 900, 85, because the numbers are read as numbers. Switch the comparison to Text and the same column would order as 900, 85, 1,200. Check the note, which says how each column was compared.

FAQ

Questions, answered

How do I sort a CSV by a column?

Paste the CSV, type the column name or number, and choose the order.

Can I sort by more than one column?

Yes. List the columns separated by commas. Later columns break ties in earlier ones.

Why does 10 sort before 2?

That happens when values are compared as text. Choose 'Numbers' or leave 'Detect' on.

Is my spreadsheet export uploaded when it is sorted?

No. Rows are sorted by script in your browser tab, and nothing is sent out.

Where do empty cells go?

To the bottom, whichever direction you sort.

Does it sort on a phone or tablet?

Yes, in current mobile browsers, within the device's memory.