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
Also try: Word Counter | Reading Time Calculator
How to Use the Line Counter
- Paste your text or code into the textarea, or click Upload File to load a local file.
- Statistics update instantly as you type.
- Enable Code Mode to see code vs comment breakdown, then pick your language.
- Use Export Statistics to download a
.txtsummary, or Copy Stats to copy to clipboard.
What Each Statistic Means
| Stat | Description |
|---|---|
| Total Lines | Every line including blank ones |
| Non-Blank Lines | Lines with at least one non-whitespace character |
| Blank Lines | Empty or whitespace-only lines |
| Words | Whitespace-delimited tokens |
| Characters | Total character count including spaces and newlines |
| Chars (no spaces) | Characters excluding all whitespace |
| Paragraphs | Blocks of text separated by blank lines |
| Avg Line Length | Mean characters per line |
| Longest Line | The single line with the most characters |
| Code Lines | Non-blank, non-comment lines (Code Mode) |
| Comment Lines | Lines starting with //, #, /*, *, or <!-- depending on language |
Comment Detection by Language
| Language | Single-line | Block |
|---|---|---|
| JavaScript / CSS | // | /* … */ |
| Python / Shell | # | """…""" / '''…''' |
| HTML | — | <!-- … --> |
| SQL | -- | /* … */ |
Related Tools
- Word Counter — detailed word frequency and readability stats
- Reading Time Calculator — estimate how long your content takes to read
