Sort words, sentences, lines or paragraphs by their length - arrange text by character count in ascending or descending order
Words
: Separates text into individual words and sorts them by length.Sentences
: Arranges complete sentences by their total character count.Lines
: Orders each line of text based on its length.Paragraphs
: Orders entire paragraphs based on their length.Shortest first
: From shortest to longest (A-Z style for length).Longest first
: From longest to shortest (Z-A style for length).Preserve punctuation
: Keeps commas, periods, exclamation points, etc., attached to their original words/sentences.Show length counts
: Displays the character count next to each item in the result.This tool analyzes your text and sorts it based on character length, but how it defines "length" depends on what you're sorting:
Words are separated by spaces, and length is counted as total characters including:
Example: "cat" (3), "doggy" (5), "elephant" (8) → sorted shortest to longest would remain in this order
Sentences are identified by ending punctuation (. ! ?) followed by a space or line break. Length includes:
Example: "Hi!" (3), "How are you?" (12), "I hope you're having a wonderful day!" (39)
Lines are separated by line breaks. Length includes everything in the line:
Example: "One" (3), "Two words" (9), "Three words here" (16)
Paragraphs are separated by blank lines. Length counts everything within the paragraph:
Paragraph length is useful for balancing content in documents or ensuring consistent information density.
Sorting text by length might seem simple, but it has many practical applications:
See how different sorting options transform your text:
Original Text | Sort Option | Sorted Result |
---|---|---|
apple banana cherry date | Words (shortest first) | date (4) apple (5) cherry (6) banana (6) |
What time is it? Hello! I need to buy milk, eggs, and bread from the store. How are you feeling today? | Sentences (longest first) | I need to buy milk, eggs, and bread from the store. (58) How are you feeling today? (25) What time is it? (14) Hello! (6) |
First line Another longer line The shortest This is the longest line in the example | Lines (shortest first) | The shortest (11) First line (10) Another longer line (19) This is the longest line in the example (40) |
First paragraph with a few words. This is a longer paragraph that contains several sentences and more words overall. It's definitely longer than the first one. Medium length paragraph here. Not too short, not too long. | Paragraphs (shortest first) | First paragraph with a few words. (34) Medium length paragraph here. Not too short, not too long. (60) This is a longer paragraph that contains several sentences and more words overall. It's definitely longer than the first one. (130) |
Note: Numbers in parentheses show character counts when "Show length counts" is enabled