How these text line tools work
Each tool treats your text as a list of lines, split on line breaks. The transforms fall into two groups. Reordering operations — sort, reverse and shuffle — change the order of the lines without changing their contents. Clean-up operations — trim, remove blank lines, remove duplicates and change case — change or drop lines. You pick one reorder option and any combination of clean-up checkboxes, and the result updates live.
Order matters, so the tool applies clean-up steps in a sensible sequence: it trims each line first, then changes case, then removes blank lines, then removes duplicates, and finally reorders what remains. That way trimming exposes hidden blanks and duplicates before they are dropped, and the chosen sort is applied to the already-cleaned list.
The key distinction to understand is text sorting versus numeric sorting. A text (alphabetical) sort compares lines character by character. Numbers written as text therefore sort by their first digit, so 10 comes before 2. A numeric sort instead reads each line as a number and orders by value.
banana / apple / banana / cherry with Trim each line, Remove duplicates and Sort A→Z enabled becomes apple / banana / cherry — three lines, with the repeated "banana" dropped. And the numbers 2 / 10 / 1 sort as 1 / 2 / 10 under Sort numerically, but as 1 / 10 / 2 under Sort A→Z.| Operation | What it does |
|---|---|
| Sort A→Z | Orders lines alphabetically (ascending), comparing text character by character. |
| Sort Z→A | Orders lines in reverse alphabetical order (descending). |
| Sort numerically | Reads each line as a number and orders by value, so 2 comes before 10. |
| Reverse | Flips the existing order so the last line becomes the first. |
| Shuffle | Randomises the order using a Fisher–Yates shuffle. |
| Remove duplicates | Keeps the first occurrence of each line and drops later exact repeats. |
| Remove blank lines | Deletes empty lines and lines containing only whitespace. |
| Trim each line | Strips leading and trailing whitespace from every line. |
| lowercase / UPPERCASE | Converts every line to lower or upper case. |
| Case-insensitive sort | Ignores capitalisation when sorting, so "Apple" and "apple" group together. |
Reference note: lines are split on both Windows (CRLF) and Unix (LF) line endings, and the result uses newline (LF) separators. All processing happens locally in your browser.
Frequently asked questions
- How do I sort a list alphabetically?
- Paste your list and select Sort A→Z (or Sort Z→A for reverse). The lines are ordered alphabetically and shown instantly. Enable the case-insensitive option to group "apple" and "Apple" together regardless of capitalisation.
- How do I remove duplicate lines?
- Tick Remove duplicates. The tool keeps the first occurrence of each line and drops later exact repeats. Turn on Trim each line first so lines differing only by trailing spaces still count as duplicates.
- How do I sort numbers correctly?
- Use Sort numerically rather than Sort A→Z. A text sort compares characters, so 10 would land before 2. Numeric sort reads each line as a number, giving the correct order 2, 9, 10, 100.
- How do I remove blank lines?
- Enable Remove blank lines. Any empty line, or one containing only whitespace, is deleted. Pair it with Trim each line to also clean up lines padded with spaces or tabs.
- How do I randomize or shuffle a list?
- Turn on Shuffle to put the lines in a random order, reshuffled with the Reshuffle button. Shuffle and sort are mutually exclusive because they impose opposite kinds of ordering.
- Is my text uploaded anywhere?
- No. Everything runs locally in your browser. Your text is never sent to a server, stored or logged — closing or refreshing the page clears it completely.