← Every block

Sort, Dedupe & Number Lines

Sort, reverse, dedupe, trim, number or shuffle lines of text.

Try one

Need to chain this with something else? Open in bode →

About Lines

Sorting is alphabetical, not numeric

Lines are compared character by character, so 10 sorts before 9 and Zebra before apple — capitals come first in the underlying character order.

For numbers, pad them to the same width first. For names, lowercase them with the Case block before sorting if the capitals matter more than the order.

Dedupe keeps the first, trim drops the empty

Deduplicating preserves the original order and keeps the first occurrence of each line, so it is safe on a list where order carries meaning. Lines differing only in trailing whitespace count as different — trim first.

Trim removes leading and trailing whitespace from every line and drops lines that end up empty, which is usually what you want after pasting from a document.

Common questions

Can it sort numbers properly?
Not yet — sorting is alphabetical. Zero-pad the numbers to equal width and alphabetical order matches numeric order.
Is the sort case-sensitive?
Yes. Uppercase letters sort before lowercase ones. Run the text through the Case block first if you want them mixed together.
Does it keep blank lines?
Sort and dedupe do. Trim removes them, along with whitespace around each line.