CanDoYa
EN

Free Line Counter

Runs entirely in your browser - no upload, no sign-up.

Your text
0total lines
0non-empty lines
0blank lines
0words
0characters
0without line breaks
Line length
avg chars / line0
longest line0
shortest non-empty line0
Share this tool

What is a line counter?

A line counter is a free tool that counts how many lines are in pasted text, including total lines, non-empty lines and blank lines. It also shows words, characters and line-length stats as you type, with no upload and no sign-up.

How to use

  1. 1Paste your text. Type or paste any text into the box above. Each line break is counted.
  2. 2Read the live totals. See total lines, non-empty lines, blank lines, words and characters update instantly.
  3. 3Check line length. Use the average, longest and shortest line-length stats to spot very long or empty rows.

Who it's for

This line counter runs entirely in your browser with plain JavaScript, so pasted logs, CSV snippets, notes and drafts stay on your device. It accepts Unix, Windows and old Mac line endings, then normalizes them for consistent counting.

FAQ

Is the line counter free?

Yes. The line counter is free to use with no account, no download and no usage limit.

Is my text uploaded anywhere?

No. All counting happens locally in your browser, so your pasted text stays on your device.

Does it count blank lines?

Yes. The tool shows total lines, non-empty lines and blank lines separately, so you can decide which count matters for your task.

Does a trailing newline count as a line?

Yes. If your text ends with a line break, the counter treats the space after it as a final blank line. This matches how many editors display a trailing empty row.

Which line endings does it support?

It supports LF, CRLF and CR line endings. Windows, macOS, Linux and terminal output all count consistently.

Can I count lines in code or CSV data?

Yes. Paste code, logs, CSV, TSV or one-item-per-line lists. The tool treats the content as plain text and never tries to parse or upload it.