Line Counter — Lines, Words & Characters

Count lines, non-empty lines, words, characters and paragraphs as you type or paste. Live, free, and runs entirely in your browser. No upload — runs 100% in your browser

How to use this tool

  1. Paste or drop your input above.
  2. The tool processes it locally — usually instantly.
  3. Copy the output or download the result.

What counts as a line?

A line is everything up to a newline character. Five newlines means six lines — but note the convention this tool follows: a trailing newline at the very end does not create an extra phantom line, which matches how most editors display a file. Windows line endings (CRLF) count as one line break each, same as Unix (LF).

The counter also separates all lines from non-empty lines. Code line budgets (style guides often cap functions at a number of lines) usually mean non-empty lines; submission systems that count "lines of text" usually mean all lines. Both numbers are shown so you can quote whichever one applies.

Why the counts are live

Nothing to click: every keystroke and every paste re-runs the count. Pasting a 50,000-line log is fine — the counting is a single pass over the text in your browser, nothing is uploaded, and closing the tab erases everything.

Typical uses

Checking an essay or abstract against a line/word limit, counting entries in a pasted list or CSV before importing it, verifying a config or code file against a size budget, and counting lines in transcripts or subtitles where each line is one caption.

Frequently Asked Questions

Are my files uploaded to a server?

No. Everything on this page runs inside your browser using JavaScript and WebAssembly. Your file never leaves your device — you can even disconnect from the internet after the page loads and the tool still works.

Why does my editor show a different line count?

Usually the trailing newline: a file ending in a newline is displayed by many editors as N lines, while some counters report N+1. This tool follows the display convention. CRLF files can also differ if a counter treats CR and LF separately.

Do blank lines count?

In the total, yes; in the non-empty count, no. Both are shown side by side.

Is there a text size limit?

No hard cap — the practical limit is your browser's memory. Very large pastes (millions of characters) remain instant because counting is one linear pass.

Related Tools

XML FormatterChinese Word CounterX/Twitter Character CounterYAML to JSONJSON to YAMLCSV to JSONCSV to ExcelExcel to CSVXML to CSVCSV to XMLHTML Entity DecoderCase ConverterKebab Case ConverterJSON DiffDOCX to TXT