Sort lines by length

Paste your text: the lines are reordered from shortest to longest.

What it's for

It puts the lines back from shortest to longest. It's the quickest way to see which entries in a list break a limit: titles that won't fit a card, captions too long for a button, menu entries that wrap, subtitle lines. At the bottom of the list are the cases to shorten, at the top the ones that are too thin: in one go you see both extremes, which scrolling through a long list never shows.

How length is counted

What gets counted are the characters of each line, spaces and punctuation included: that's the measure that matters when the problem is room, because a space takes up room too. Lines of equal length stay in the order they were in, so two entries of the same length don't swap places for no reason and the list stays predictable. Empty lines have length zero and all end up at the top.

One surprising detail: emoji count as two, because in a computer they take up two slots. On a list of titles with emoji the order may therefore not be the one you'd see by eye.

This isn't alphabetical order

What's written doesn't matter here, only how long the line is: «zebra» comes before «apricot» because it has fewer letters. If you need alphabetical order the page is Sort lines, and if you need numbers in order of value Sort numbers.

Nearby tools

Once you've found the lines that are too long, to cut them all to the same size there is Shorten lines. If the limit to respect is a social network's, the count for each platform is done by Social character counter, and for the total characters and words of a text Word counter.