Sorting arranges names, keywords, identifiers or numeric values into a chosen order. The most important decision is whether the values should be compared as text or as numbers. Input cleanliness and comparison rules also affect the result.
Text sorting versus numeric sorting
Text sorting compares character sequences, while numeric sorting compares numerical values. For example, sorting the values 2, 10 and 3 as text may place 10 before 2; numeric sorting gives 2, 3, 10. Select the mode that matches the meaning of the data.
Sort with Tervilo
- Open the Tervilo Text Sorter.
- Paste the list, preferably with one item per line.
- Choose ascending or descending order.
- Select text or numeric behaviour as appropriate.
- Run the sort, then inspect the first, last and a few middle entries.
Prepare the input
Remove accidental leading or trailing spaces and decide how to handle blank lines before sorting. Entries that look identical can be treated differently if one contains hidden whitespace. Do not normalize text automatically if those differences are meaningful for the task.
Ascending and descending order
Ascending order usually means A to Z or smallest to largest; descending reverses that order. For dates, currency, version numbers or values with units, a plain text sorter may not interpret the values as intended. Use a spreadsheet or database with an appropriate field type for structured data.
Case and locale can affect order
Some sorters distinguish uppercase from lowercase, and sorting rules for accented letters or different languages may vary. If the list contains names or labels with mixed capitalization, review the output instead of assuming the order will match a person's natural-language expectations.
Sorting does not remove duplicates
Sorting changes the order of entries; it does not make repeated values unique. If you need a unique list, remove duplicate lines as a separate step and then sort the cleaned result. If duplicates carry meaning, retain them.
When a plain text sorter is not enough
Lists containing multiple columns, dates, currency values or structured records need a method that understands each field. Sorting a CSV file as raw lines can produce the wrong result when the desired order depends on a particular column.
Common mistakes
- Using text sorting for numeric values.
- Sorting before checking whitespace and blank lines.
- Expecting sorting to remove duplicates.
- Assuming mixed-case or multilingual text always follows one universal order.
- Sorting structured rows as plain text when a field-specific sort is required.
Verification checklist
- Each item is on the intended line.
- Text or numeric sorting was selected deliberately.
- Ascending or descending order matches the requirement.
- Whitespace and blank-line handling are understood.
- Duplicates were retained or removed intentionally.
- The output was reviewed before being used elsewhere.
Quick answer
Use text sorting for character-based lists and numeric sorting for numbers. Clean the input carefully, understand how case and whitespace affect order, and remember that sorting and deduplication are separate operations.