BroHelp.me

Line Counter

Counting the number of lines.




Number of Lines - 0

How This Converter Works

Counts lines split by CRLF, CR, or LF. Empty input is specially reported as zero; a trailing line break creates a final counted empty line.

Formula or rule

For non-empty input, line count = input.split(/\r\n|\r|\n/).length.

Example

Input
red
blue
Calculation
The LF separates the input into two segments.
Result
2
© BroHelp.me 2026 - 2026 is provided without warranty of any kind.