Text tool

Find Longest Line

Paste text to find its longest line locally, with line endings excluded from every length.

In-browser processingNo account requiredPrivacy details ↗

A QUICK WALKTHROUGH

How to use this tool

  1. Paste up to 100,000 UTF-16 characters.
  2. Find the longest line using Unicode code points.
  3. Review the first line when multiple lines share the maximum length.

Defined line handling

LF, CRLF, and CR each separate lines and are excluded from line lengths. Empty lines count as zero code points, including a trailing empty line after a final line ending. An empty input has no line to report. Length is measured with Unicode code points, so supplementary characters count as one.

First tie wins

The result reports the first line with the maximum length. Original line text is preserved exactly, including spaces and punctuation.

GOOD TO KNOW

Common questions

How is length counted?

Each line uses Unicode code points, not UTF-16 code units or visible grapheme clusters.

Do line endings count?

No. LF, CRLF, and CR are separators and are excluded.

What happens when lines tie?

The first line with the maximum length is reported.