Boneyard Tools

Sort Lines of Text

Paste a list and sort the lines alphabetically or by number. Reverse the order, ignore case, or strip duplicate lines, then copy the clean result.

How to sort lines of text

  1. Paste your list into the box, one item per line.
  2. Pick ascending or descending, and turn on numeric, case-sensitive, or remove duplicates if you need them.
  3. Copy the sorted result.

Examples

Alphabetize a list

banana
apple
cherry
apple
banana
cherry

Sort numbers in order

10
2
1
1
2
10

Frequently asked questions

How is numeric sorting different from alphabetical?

Alphabetical sorting compares text character by character, so '10' lands before '2'. Numeric sorting reads each line as a number, so 2 comes before 10. Turn on the numeric option for lists of numbers.

Does sorting ignore upper and lower case?

By default it does, so 'apple' and 'Apple' group together. Turn on case-sensitive sorting to treat uppercase and lowercase as distinct, which places capitalized lines first.

Can I sort in reverse order?

Yes. Switch the order to descending to sort Z to A, or from highest to lowest number when numeric sorting is on.

Can it remove duplicate lines while sorting?

Yes. Turn on remove duplicates and any repeated lines are dropped after sorting, leaving one of each. Case-insensitive mode treats 'Apple' and 'apple' as the same line.

What happens to blank lines and number lists with words?

A single trailing newline is ignored so it does not create an empty entry. In numeric mode, lines that are not numbers are kept and moved to the end of the list.

Is my text private?

Yes. Sorting runs entirely in your browser and nothing is uploaded to a server.

Related tools