Skip to content
UniKit

Blank line counter

Count total, blank, and non-blank lines, treating whitespace-only lines as blank and supporting CRLF, CR, and LF.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Text

Statistics

One statistic per line.

Enter text to count

: 0 · : 0 · : 0

What this tool does

  • Inspect blank-line ratios in code or logs.
  • Check copied text for unexpected blank lines.

Example

Input

first

last

Output

Total lines: 3
Blank lines: 1
Non-blank lines: 2

Whitespace-only lines are blank by default; a trailing break creates a final empty line.

Frequently asked questions

How many lines does empty input have?

One blank line.

Are Windows endings supported?

Yes, CRLF, CR, and LF are recognized.

How can I count only zero-length lines?

Disable whitespace-only lines.

Keywords:空行计数行数统计文本分析blank linesline countertext statistics

Related tools