Sort CSV data alphabetically, numerically, or by date
Sort tabular CSV records ascending or descending by any column value.
🛡️ Your rows never leave your browser.
Why Onfyt: Performs type-aware numeric, date, and alphabetical sorting in-memory without lexicographic numeric errors.
Interactive Sample Data
| id | product | price | stock |
|---|---|---|---|
| 101 | Inverter | 450 | 12 |
| 102 | Battery | 1200 | 4 |
| 103 | Cable | 25 | 150 |
How this tool works
Sorting tabular datasets is a fundamental prerequisite for reporting, data reconciliation, and deduplication. Naive sorting utilities in text editors sort strictly alphabetically (lexicographically), causing numeric values like 100 to sort before 20 because '1' precedes '2'.
DataFix detects column data types automatically. Numeric columns sort numerically (25 < 450 < 1200), date columns sort chronologically, and text columns sort alphabetically using locale-aware collation rules.
Sorting CSV records by primary keys, timestamp sequences, or numeric transaction amounts is a fundamental prerequisite for deduplication, binary search operations, and financial auditing. Naive sorting algorithms often sort numbers alphabetically (treating "100" as smaller than "20"), causing catastrophic indexing bugs in automated reconciliation pipelines. DataFix's sorting engine automatically infers column data types, applying natural numeric comparison to integers and floats, chronological comparison to ISO-8601 timestamps, and locale-aware collation to unicode strings. The engine preserves multi-line quoted cells during row reordering and ensures stable sorting behavior when duplicate sorting keys are present.
Natural numeric sorting versus alphanumeric sorting is critical in data operations. A lexicographical sort incorrectly places '10' before '2', creating corrupted index orders in financial ledgers and serial sequence logs. DataFix applies type-aware comparison, correctly evaluating integers, floating-point decimals, and ISO dates while keeping multi-line quoted fields intact.
In enterprise financial ledgers, sorting by transaction timestamps or composite account codes must preserve row parity without truncating secondary identifiers. When identical sorting keys exist, stable sorting ensures that original input order is preserved. DataFix processes large tabular files in client-side memory using quicksort variants optimized for web workers, ensuring rapid execution without UI locking.
Things that usually go wrong
- Numeric columns sorted as text produce wrong order: '10' < '2' alphabetically. The tool auto-detects numeric columns.
- Mixed content columns (some cells numeric, some text) sort unpredictably.
Edge cases we tested
🧪 Numeric column with currency signs ('$45', '$120')
Strips currency symbols internally during comparison to ensure true numerical ordering.
🧪 Empty or null values in sorted column
Placed predictably at the bottom or top based on user preference.
Frequently Asked Questions
Can I sort by multiple columns?
Yes — add up to 5 sort keys. Rows are sorted by the first key, then ties are broken by the second, and so on.
Is the sort stable?
Yes — rows that tie on all sort keys retain their original relative order.
Related tools
Format
JSON Formatter
Beautify and indent unformatted JSON strings into clean, human-readable structured trees.
Open Tool →
Format
JSON Minifier
Compress structured JSON files into single-line minified strings to reduce payload size.
Open Tool →
Format
Change CSV Delimiter
Switch spreadsheet delimiters between commas, semicolons, tabs, and pipes seamlessly.
Open Tool →