Zero Signup ToolsFree browser tools

Converter Tools

CSV Sorter

Sort CSV data by one or more columns in your browser. Multi-column keys, ascending or descending per column, header-safe, with number, date, and text detection.

Source CSV

Paste, drop, or open your CSV file

Input delimiter

Detected: Comma

Parsed 9 rows x 7 columns (first row treated as header).

Sort keys

Order rows by one or more columns

2 of 4 sort keys active.

  • # 1

    Direction

    Sorting as text

  • # 2

    Direction

    Sorting as number

Output options

Output delimiter

Sort settings

Blanks

Sorted CSV

Rows reordered by your sort keys

8 data rows plus header · 537 B · from 8 input data rows

What this tool covers

  • Multi-column sort: stack up to 4 sort keys with independent direction and compare type so primary, secondary, and tiebreaker orders all apply in one pass.
  • Type detection: number, date, and text columns are detected from the first 200 data cells, so numeric prices sort 9 before 10 instead of 10 before 9.
  • Header-safe: when the first row is a header, it stays pinned at the top while only the data rows are reordered.
  • Stable order: equal sort keys preserve the original row order, so re-sorting on a secondary key never scrambles the data.
  • Delimiter aware: comma, tab, semicolon, and pipe inputs are supported with auto-detection, and the output can use a different delimiter than the input.
  • Blank policy: choose whether empty cells land at the start or end of each sort key, so partial data does not crowd the top of the file.

How to use

  1. Paste your CSV into the input box, or click Open CSV file to load a .csv or .tsv from your computer. Use Load sample to try the tool with example data.
  2. Confirm whether the first row is a header. Pick the input delimiter or leave it on Auto: the tool detects comma, tab, semicolon, or pipe and shows what it picked.
  3. Click Add sort key to pick a column, a direction, and a compare type. Auto picks number, date, or text from the column data; override it when you know better.
  4. Stack up to four sort keys. The first key is the primary order; the next keys break ties. Use Up and Down to reorder keys without removing them.
  5. Toggle Case sensitive text sort and the Blanks policy (At end or At start) to fine-tune how mixed-case and empty cells land.
  6. Copy the sorted CSV with Copy CSV, or use Download to save it as .csv or .tsv. The output delimiter can differ from the input delimiter.

About this tool

CSV Sorter reorders the rows of a CSV by one or more columns directly in your browser. Paste, drop, or open a CSV (or TSV, semicolon, or pipe-separated file), confirm whether the first row is a header, and add up to four sort keys. Each sort key picks a column, a direction (ascending or descending), and a compare type (auto, text, number, or date). Auto inspects the first 200 data cells in the column and chooses number when every value parses as a signed decimal with optional currency or percent, date when every value matches ISO 8601 or one of the common slash and dash formats, and text otherwise, so a price column sorts 9 before 10 instead of 10 before 9 and a signup_date column sorts chronologically rather than as a string. The sort is stable: rows with equal sort keys keep their original order, so re-sorting by a secondary key never scrambles the data you arranged with the primary key. Empty cells follow a configurable policy (land at the start or the end of each sort key), text comparison uses a locale-aware collator with optional case sensitivity, and numeric and date comparisons fall back to text when a column unexpectedly mixes types so the tool never throws on partial data. The CSV parser follows RFC 4180: it handles double-quoted fields, escaped quotes (two adjacent quote characters), multi-line cells, and CRLF or LF line endings, and points at the line and column of any malformed input. Output is re-emitted as RFC 4180 CSV, quoting only the fields that contain the delimiter, a quote, or a newline. The output delimiter can differ from the input delimiter, so the tool doubles as a delimiter converter while it sorts. Useful for data analysts staging exports before loading them into a BI tool, marketers cleaning a contact list by country then by signup date, developers preparing fixture data for tests, finance teams ordering a transactions export, journalists preparing a dataset for publication, and anyone who would otherwise reach for a spreadsheet just to do a multi-column sort. The CSV stays entirely in your browser. Nothing is uploaded.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsConverter Tools