📝 Text Tools: Sort, Dedupe, Reverse
Quick line operations: sort, remove duplicates, reverse, shuffle, trim.
Last updated: November 8, 2026 · By the BoltQuickTools team
Operations (run on input, write to output)
Tidy a list without opening a spreadsheet or terminal
Mailing lists with repeats, log extracts that need counting, and columns copied out of a report all end up as one item per line. This page runs one operation at a time on those lines, the way sort and uniq do on the command line.
How the buttons work together
Paste into Input and press any button under Operations. The result goes to Output and your input stays as it was. To chain steps, press ← Use output as input and then the next operation. Copy output copies the result and Clear empties both boxes.
The available operations are Sort A-Z, Sort Z-A, Sort by length, Sort numeric, Remove duplicates, Dedupe (case-insensitive), Reverse line order, Shuffle lines, Trim whitespace, Remove empty lines, Reverse each line, lowercase, UPPERCASE and Count occurrences. The line under the boxes reports total, non-empty and unique lines for the last result, and switches back to the input when you type.
What each operation does to one sample
The page loads with this six-line list: banana, apple, cherry, Apple, banana, date.
| Button | Output |
|---|---|
| Sort A-Z | Apple, apple, banana, banana, cherry, date |
| Sort by length | date, apple, Apple, banana, cherry, banana |
| Remove duplicates | banana, apple, cherry, Apple, date |
| Dedupe (case-insensitive) | banana, apple, cherry, date |
| Reverse line order | date, banana, Apple, cherry, apple, banana |
Commas stand in for line breaks here. Count occurrences returns the count, a tab, then the line, most frequent first:
2 banana
1 apple
1 cherry
1 Apple
1 date
Behaviour worth checking before you trust the result
- Sorting is by character code. Uppercase letters come before lowercase ones and accented letters come after
z. There is no natural ordering, soitem10sorts beforeitem2. - Sort numeric needs a number at the start of each line.
2.5kgcounts as 2.5. A line likev2has no numeric value and breaks the ordering around it:10, 9, 2.5kg, v2, 100comes back as2.5kg, 9, 10, v2, 100. - Duplicates must match exactly.
aandawith a leading space are two different lines. Run Trim whitespace first if your data is untidy. - A trailing newline is a line. Text ending in a line break has one empty line at the end, and it takes part in sorting, deduplicating and counting. Remove empty lines drops it, along with any line holding only spaces.
- Count occurrences breaks on two special words. A line reading exactly
constructorgets a garbled count such asfunction Object() { [native code] }1, and a line reading exactly__proto__disappears from the result. This comes from how the page stores its tally. - Reverse each line splits emoji. It reverses UTF-16 code units, so characters outside the basic range, including most emoji, come out as broken symbols.
- There is no undo. Use output as input replaces the Input box, so copy anything you want to keep first.
Questions about duplicates, case and shuffling
Which copy survives when duplicates are removed?
The first one, and the order of the remaining lines does not change. In the case-insensitive version the first spelling wins, which is why apple stays and Apple goes in the sample above.
Can I sort without case mattering?
Not here while keeping the original capitals. Press lowercase, move the output to the input, then Sort A-Z, and accept that the capitals are lost. The line sorter has a case-insensitive sort and natural sort options that leave capitals alone.
Is Shuffle lines good enough for a draw or a password list?
It is a uniform shuffle driven by Math.random(), which is fine for ordering a list but predictable in principle. For anything secret, use the password generator, which is built for that purpose.
How do I change capitalisation styles beyond upper and lower?
This page only has those two. Title case, camelCase and similar styles are on the case converter.