Sort CSV
Sort CSV rows by text or numbers, with clickable column headings and a live table preview.
How it works & useful details
Formats & limits
Import UTF-8 text up to 1.5 MB or paste up to 500,000 characters. CSV accepts comma, tab, semicolon or pipe separators, doubled quotes and line breaks inside quoted fields. All rows must have the same number of fields. A final line ending is ignored; interior blank rows are real rows. A leading UTF-8 BOM is removed. Up to 10,000 rows including the header, 100 columns, 100,000 cells and 50,000 characters per cell. Output is limited to 2,000,000 characters.
Live previews pause above 50,000 input characters; exports still process the full bounded input. The table pages through 15 rows and 12 columns at a time. Export includes every result row. Processing is synchronous and bounded; cancellation is checked before and after a transformation.
Data details
Text comparisons use Unicode code-unit order, with optional case folding. Numeric sorting/filtering requires finite numbers in every selected cell and uses JavaScript decimal precision; large integer identifiers need text mode. No trimming or spreadsheet formulas are evaluated.
CSV-to-JSON defaults to strings. JSON object export requires unique, nonempty headers. JSON input uses object keys in discovery order (integer-like keys follow JSON property order), missing properties become empty cells, and arrays must be rectangular. Primitive arrays get one “Value” column. Null becomes the literal text “null” by default; nested objects/arrays become compact JSON strings. Empty strings, missing values and optional empty nulls are indistinguishable in CSV. Mixed row shapes are rejected. JSON numbers use JavaScript precision; unsafe integers are rejected, so quote large IDs. Duplicate JSON names use the last value.
Transpose allows up to 100 source rows including the optional header, and exports all transposed cells as data. Spreadsheet formula protection is opt-in: it prefixes formula-like cells with an apostrophe, visibly changing their data. Spreadsheet programs differ; review results before opening them.
About this tool
Sort CSV sorts rows by a column, either as text or as numbers, and previews the result in the table immediately. Clicking a column heading in the preview applies the same sort, which makes it easy to check the order before exporting.
Sorting happens locally. Numeric sorting requires finite numbers in every cell of the chosen column, and the tool reports rows that do not qualify instead of reordering them unpredictably.
How to use it
- Import a CSV file or paste the text.
- Pick the sort column and choose text or numeric ordering.
- Toggle ascending or descending and check the live preview.
- Export the sorted CSV.
Worked example
Sorting the sample table by Score, numerically ascending, gives Sam (76), Lin (84), Jo (88), then both Ada rows (92). Rows with equal scores keep their original order.
The difference between text and number sorting shows up with values of different lengths. A Qty column containing 9, 10, and 100 sorts as 9, 10, 100 numerically, but as 10, 100, 9 as text, because text comparison looks at the first character.
Tips for clean sorting
- Use number mode for amounts, counts, and IDs that are pure digits. Use text mode for names, codes, and anything with letters.
- ISO dates (2026-09-24) sort correctly as text. Dates like 24/09/2026 do not. Convert them first if you need chronological order.
- Keep the header option enabled so the heading row stays at the top instead of being sorted in with the data.
- Descending order puts the largest numbers or the end of the alphabet first.
Only the rows move. Cell contents, quoting, and the number of columns are preserved in the output.
Frequently asked questions
How are text values sorted?
Text uses Unicode code-unit order, so uppercase letters sort before lowercase ones unless you normalize case first.
Can I sort by multiple columns?
The workspace sorts by one column at a time. Sort twice or normalize the data beforehand if you need a compound order.
What are the limits?
Up to 10,000 rows, 100 columns, and 100,000 cells, with large inputs pausing live preview above 50,000 characters.
