Text tool

Find Shortest Line

Paste multi-line text to see the line number, length, and content of every shortest line, including empty lines.

In-browser processingNo account requiredPrivacy details ↗

Find the shortest line

Lines use LF, CRLF, or CR separators. Length is Unicode code points; empty lines count as 0.

Paste text to find its shortest line.

A QUICK WALKTHROUGH

How to use this tool

  1. Paste up to 100,000 UTF-16 characters.
  2. Find the shortest line.
  3. Review every tied line and its Unicode code-point length.

Line and length definitions

Lines are split by LF, CRLF, or CR, and line terminators are excluded from the length. Length uses Unicode code points, so a character represented by a surrogate pair counts as 1. Empty lines have length 0, and every line with the shortest length is shown.

GOOD TO KNOW

Common questions

Are empty lines included?

Yes. An empty line has length 0, so it is shortest whenever one is present.

What happens on a tie?

Every line with the minimum length is shown with its original line number and content.

Do line terminators count?

No. LF, CRLF, and CR only separate lines and are excluded from the Unicode code-point length.

Is my text uploaded?

No. The result is calculated locally in this browser.