Count total words, unique words, and average word length.
Count total characters with and without spaces, bytes, and glyphs.
Strip empty lines and whitespace-only lines from text.
Add prefix numbers or custom formatting to each line.
Remove duplicate lines from text while preserving or sorting order.
Knowing exactly how many lines are in a code file, log export, or list can save time when estimating scope, checking against a limit, or verifying an export completed correctly, and this line counter gives you that number instantly. It reports total lines along with a breakdown of non-empty and blank lines, which developers use to gauge file size, writers use to check formatting, and data workers use to sanity-check exported lists. Simply paste your text and the counts update immediately as you type or edit. Because the tool runs entirely in your browser, there's no upload step and your content stays completely private throughout. Paste your text below to see the line breakdown right away.
Total lines includes every line in the text, including blank ones, while non-empty lines only counts lines that contain visible content.
Yes, paste any code file's contents to get an instant line count, useful for rough size estimates or comparing files.
Handling of trailing newlines can vary slightly between tools; this counter follows standard conventions for counting the final line consistently.
No hard limit, since counting is performed locally in your browser rather than through a server upload.
Yes, since each row in a typical CSV export corresponds to one line, this tool can give you a quick sanity check on row count.
No, all counting happens client-side in JavaScript and your text is never uploaded.