Code Mode
No file chosen

Supports: .txt, .js, .ts, .py, .html, .css, .sql, .sh, .md, .json, and more

0
Total Lines
0
Non-Blank Lines
0
Blank Lines
0
Words
0
Characters
0
Chars (no spaces)
0
Paragraphs
0
Avg Line Length


How to Use the Line Counter

  1. Paste your text or code into the textarea, or click Upload File to load a local file.
  2. Statistics update instantly as you type.
  3. Enable Code Mode to see code vs comment breakdown, then pick your language.
  4. Use Export Statistics to download a .txt summary, or Copy Stats to copy to clipboard.

What Each Statistic Means

StatDescription
Total LinesEvery line including blank ones
Non-Blank LinesLines with at least one non-whitespace character
Blank LinesEmpty or whitespace-only lines
WordsWhitespace-delimited tokens
CharactersTotal character count including spaces and newlines
Chars (no spaces)Characters excluding all whitespace
ParagraphsBlocks of text separated by blank lines
Avg Line LengthMean characters per line
Longest LineThe single line with the most characters
Code LinesNon-blank, non-comment lines (Code Mode)
Comment LinesLines starting with //, #, /*, *, or <!-- depending on language

Comment Detection by Language

LanguageSingle-lineBlock
JavaScript / CSS///* … */
Python / Shell#"""…""" / '''…'''
HTML<!-- … -->
SQL--/* … */