CSV Sorter

Sort CSV records by one column using case-sensitive text or numeric order, ascending or descending.

Processing stays in this browser. No CSV is uploaded.

Comma-separated CSV: up to 200,000 characters, 200 unique nonempty headers and 10,000 data rows.

Text uses case-sensitive code-unit order, not language-specific alphabetic order. Numeric mode rejects blanks and nonnumeric cells; equal values retain their original order.

Preserve mode keeps cell strings. Protection prefixes formula-like cells with an apostrophe, including negative numbers and headers; this changes their values. CSV quoting and line endings are normalized.

Sort records without separating their columns

Paste CSV with a header row, choose a Sort column, and select Sort rows. The complete record moves as one unit, so names remain paired with their scores. The header stays first. Copy the output or download a new CSV; your original file is not changed.

Text versus numeric order

Load the example and select score. Text order puts 10 before 2, because it compares strings by code units. Enable Compare as decimal numbers to put Lin's score of 2 before Ada's and Kim's scores of 10. Ada remains before Kim because equal values retain their input order. Descending order reverses the comparison but still preserves ties.

Numeric mode accepts finite decimal numbers, including signs and exponent notation. It rejects empty cells, currency symbols and grouping commas instead of silently guessing a value. It uses JavaScript floating-point numbers, so very large integers and extremely precise decimals may compare as equal. Cell strings in the exported file remain unchanged.

Limits and troubleshooting

CSV must use commas and unique nonempty headers. Quoted commas and line breaks are supported; rows must have the same width as the header. Limits are 200,000 characters, 200 columns and 10,000 data records. Text comparison is case-sensitive and does not use a language-specific alphabet. Dates are treated as text unless you convert them separately.

Preserve export keeps cell strings. Optional spreadsheet protection adds apostrophes to formula-like values, including negative numbers. Both modes normalize quoting and line endings. Changing input or options clears old results and downloads.

Use CSV Row Filter to narrow the records before sorting, or CSV Deduplicator to remove exact repeated rows. This tool sorts one column at a time; it does not merge records or support multiple sort keys.