Count Lines Online
Count the total, non-empty and blank lines in any pasted text.
Text Tools Runs in your browser
How do you count lines online?
Paste a list, log excerpt or code block and this tool reports three figures: total lines, lines with content, and blank lines. It recognises Windows (CRLF), Unix (LF) and old Mac (CR) line endings, and a final line without a trailing break still counts. Useful when a CSV should have exactly 500 rows and you need to prove it.
How to use the Count Lines
- 1 Drop your list, log or code into the text area.
- 2 Read the three totals: all lines, non-empty lines, blank lines.
- 3 Subtract blanks from the total if you only care about content rows.
- 4 Grab the report with the copy button.
What you can use it for
- Counting rows in a pasted CSV or export.
- Checking how many lines a code snippet spans.
- Sizing log output before attaching it to a ticket.
- Verifying a list has the expected number of entries.
Frequently asked questions
How is a line defined?
Every line break starts a new line, whatever style produced it: CRLF from Windows, LF from Unix and macOS, or a lone CR from very old files. Text after the last break counts as a line too.
Are blank lines included in the total?
Yes. The headline total counts every line, blank or not, and a separate figure isolates the empty ones so you can subtract them for a content-only count.
Can I count rows in a CSV or log file?
Paste the file contents in and read the total. Remember a CSV usually carries a header row, so subtract one to get the record count.
Related tools
More Text Tools
More tools like this:
All Text Tools