Text guide
How to sort lines of text
Line sorting treats each line as one record. Choose alphabetical, numerical, reverse, or length order based on what the values represent.
Open the Sort Lines toolChoose a comparison that matches the data
| Mode | Best for | Important detail |
|---|---|---|
| Alphabetical | Names and labels | Case and locale affect order |
| Reverse alphabetical | Descending labels | Reverses the selected collation |
| Numerical | Lines containing numbers | Compares numeric value, not digits |
| By length | Finding short or long lines | Whitespace contributes to length |
How to sort lines
- Place one complete item on each line.
- Paste the list into the ToolPixels Sort Lines tool.
- Select the comparison mode and direction.
- Choose case and blank-line options where available.
- Sort, inspect the first and last entries, then copy or download.
Alphabetical and numerical order differ
Alphabetical sorting compares text, so 10 can appear before 2 because the first character 1 comes before 2. Numerical sorting compares values and therefore places 2 before 10.
Mixed values need a rule
A line such as Item 12 is not simply the number 12. If records mix labels and numbers, decide whether to sort the full text or extract a numeric key first.
Clean carefully before sorting
Leading spaces can move an item unexpectedly, while trailing spaces can affect length. Blank lines may collect at one end. Normalize these only if whitespace is not part of the record.
Sorting also removes the original sequence. Keep a source copy when order represents chronology, priority, or a manually curated ranking. If duplicates should be removed, deduplicate separately and verify the count.
Common questions
Why are uppercase items grouped differently?
The chosen case and collation rules affect comparison. Use case-insensitive sorting for human-facing lists unless capitalization itself is significant.
Can I sort CSV rows?
You can sort whole lines, but the tool does not select a CSV column or parse quoted fields. Use a spreadsheet or data tool for column-aware sorting.