Re-serialise CSV with correct RFC 4180 quoting and CRLF line endings, reporting structural problems.
CSV Sort Tool
Sort CSV rows by a column, detecting a numeric column automatically and keeping blanks last in either direction.
- Free
- No sign-up
- Runs in your browser
Input
0 characters
Processed entirely in your browser. Nothing is uploaded.
Try an example
Fill in Input and Sort by column to continue.
Enter your input to see the result
Everything happens on this device. No upload, no account, no network request.
How to use this tool
- 1
Paste your CSV or TSV data. The delimiter is detected by counting candidates outside quoted fields.
- 2
Structural problems are reported as warnings with line numbers: ragged rows, duplicate column names, an unterminated quote, a stray BOM.
- 3
Copy or download the result.
Questions about CSV Sort Tool
Where do blank cells end up?
Last, in both ascending and descending order. That needs the blanks to be partitioned out rather than handled in the comparator: a comparator that calls blank "greater" works ascending, then the reverse for descending moves every blank to the front.
Will this handle quoted fields and embedded commas?
Yes. The parser implements RFC 4180 properly: quoted fields, delimiters and newlines inside quotes, and doubled quotes as a literal quote. That is the case a split-on-comma implementation gets wrong, and it is most real data.
Is my data sent anywhere?
No. This tool runs as JavaScript inside your browser tab. There is no network request carrying your input, nothing is written to a server log, and it keeps working with your connection switched off. You can confirm it in the browser’s network panel. That matters more here than elsewhere on the site: developer tools handle tokens, keys and production data.
Does the CSV Sort Tool work offline?
Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the CSV Sort Tool keeps working with the network switched off and nothing is ever sent to a server.
Is anything I enter into the CSV Sort Tool uploaded or stored?
No. The CSV Sort Tool runs in your browser, so whatever you type or paste never leaves your device — there is no server round-trip, nothing is logged, and there is nothing to delete afterwards.
Related tools
Other tools you might reach for next.
Check CSV structure and infer a type per column, reporting ragged rows, duplicate headers and quoting faults with line numbers.
Remove duplicate rows, comparing every column or only the ones you name, keeping the first occurrence.
Keep only the columns you name, in the order you name them.
Keep CSV rows matching a condition, comparing numerically when both sides are genuinely numbers.
Group CSV rows by a column and aggregate another, optionally cross-tabulating into columns.
Format and indent JSON, with optional alphabetical key sorting and a precise syntax error when it will not parse.
Strip every byte of insignificant whitespace from JSON and report the saving.