free tool, no sign-up

Alphabetical Order

Sort lines from A to Z or Z to A, and remove line breaks by joining each line with a space.

One item per line for sorting

Tool

Order

Capitals stay as typed. Apple sorts before banana.

Paste one item per line to see the list in alphabetical order.

Examples

This alphabetical order tool sorts each line from A to Z or from Z to A and leaves the spelling as you typed it. Capitals do not change the order, so banana, Apple, and cherry become Apple, banana, cherry. A toggle keeps duplicate lines or drops a later line that matches an earlier one once capitalization is ignored. The same page removes line breaks by joining the lines with a single space, which clears new lines and line feeds from pasted text. The reverse puts a line break at each space, one word per line, and does not try to put the original breaks back.

Put lines in alphabetical order, or remove line breaks

Paste one item per line and the list updates as you type. A to Z and Z to A ignore capitalization, and the letters stay as you typed them. banana, Apple, and cherry sort as Apple, banana, cherry. Numbers in a line sort by value, so item 2 comes before item 10. Keep duplicate lines leaves repeated lines in place. Turn it off and a line that matches an earlier one, once capitalization is ignored, is dropped. The line that appeared first in the list is the one that stays. Blank lines are skipped.

Line breaks removes new lines by joining each line to the next with a single space. A sentence broken across several lines becomes one line. Add line breaks is the reverse: each space becomes a line break, and every word sits on its own line. The tool does not store the line endings from the paste, so this reverse does not try to restore the original breaks.

Frequently Asked Questions

How does alphabetical order treat capitals?

The sort ignores capitalization, and the letters on each line stay as you typed them. Apple comes before banana. banana, Apple, and cherry become Apple, banana, cherry. Z to A reverses that order.

Can I keep or drop duplicate lines?

Keep duplicate lines is on until you turn it off. A duplicate is a line that matches another once capitalization is ignored, so Apple and apple count as the same line. The copy that appeared first in your list is the one that stays.

How do I remove line breaks?

Choose Line breaks, then Remove line breaks. Each line is joined to the next with a single space, so new lines and line feeds drop out of a pasted paragraph. Blank lines are skipped, and spaces at the start or end of a line are left out.

What does the reverse of removing line breaks do?

Add line breaks replaces each space with a line break, so every word is on its own line. It reads the text in the box now. It does not try to restore the original line breaks, because those endings are not saved.

Related Tools