Code Line Counter
Count lines in any text live as you type: total, non-empty and blank lines, plus longest and average line length.
Result
Pasting source code into a line counter usually raises one specific question: how many lines actually contain code, as opposed to blank lines left for readability? This page opens the counter for exactly that use case.
Paste a file, a function or a diff and get the raw total line count (matching what your editor's gutter would show), the count of non-empty lines, and how many are blank — a quick way to sanity-check a file size limit, a code review budget, or a "no more than N lines per function" style rule. The longest-line figure also flags a line that may need wrapping.
The count runs locally: no source code is ever sent to a server. This tool only counts lines and characters — it does not parse syntax or detect comments, so "non-empty" means any line with a visible character, comment or code alike.