About Find Longest / Shortest Line
Analyses every line in your text and reports which is the longest and shortest (by character count), along with their line numbers. Also shows average and median line length. Runs entirely in your browser.
Analyses every line in your text and reports which is the longest and shortest (by character count), along with their line numbers. Also shows average and median line length. Runs entirely in your browser.
Paste any block of text — log output, prose, a CSV column — and the tool splits it on newlines (and again on whitespace for words) then sorts each list by length to find the extremes. Empty lines are excluded from the 'shortest' result so the answer is meaningful instead of always being zero.
Length is measured in JavaScript code units, which is fine for ASCII and most Latin text. Strings containing emoji or surrogate pairs may report a length one or two characters higher than what you visually count. Useful for checking whether title-tags fit Google's 60-char preview, finding the longest log line in a debug dump, or spotting an outlier row in a flat file.
It uses JavaScript's String.length, which counts UTF-16 code units. ASCII and Latin text count as you'd expect; emoji and some CJK characters may add 2 to the count due to surrogate pairs.
No — empty lines are excluded from the 'shortest line' calculation, otherwise the answer would always be 0. The longest result includes every non-empty line.
The tool reports the count of ties and shows the first match. For example, if three lines all share the maximum length, you'll see 'Longest: 3 lines tied at 142 chars'.
Word mode splits on any whitespace (spaces, tabs, newlines). Punctuation stays attached — 'don't' counts as one 5-character word, not two.
Explore the full suite of TEXT tools and 290+ other free utilities at Chunky Munster.