Text & Writing tool

Text Line Counter

A line counter is the tool every developer and editor reaches for at some point. Paste a log file, a CSV, a poem or a config file and the Line Counter returns the total line count, the number of non-empty lines, the number of blank lines, plus words, characters and the longest line in the document.

It updates as you type and runs entirely in your browser, so nothing is uploaded. Use it to check whether a file fits a limit, to count the stanzas in a poem, or to verify that a log export is complete.
Calculator

How to use the Text Line Counter

  1. Paste or type the text you want to measure.
  2. The counts update as you type - no button needed.
  3. Compare total lines with non-empty lines to see how much is blank.
  4. Check the longest line for anything that will wrap oddly.

About this tool

The Text Line Counter is built for speed and accuracy: every calculation runs in your browser, so your data never leaves your device and the result updates as you type. It works equally well on a phone, a tablet or a desktop, and it is free to use as many times as you like.

Common use cases

  • Checking that a log file export is complete.
  • Counting the lines in a poem or a lyric.
  • Verifying a CSV row count before import.
  • Measuring a config file against a size limit.

Tips for the best result

  • Use the latest figures you have - even a small change in rate or term can shift the outcome by hundreds.
  • For annual figures, divide by 12 to get a monthly number you can compare with the result.
  • Bookmark this page and revisit the calculation as the inputs change.

Frequently asked questions

How are blank lines counted?

A line containing only whitespace (spaces, tabs) counts as blank. Any non-whitespace character makes the line non-empty.

Is there a size limit?

No. The tool counts whatever you paste, and because it runs locally there is no upload limit.