Line Counter
Count total, non-empty, blank and unique lines, and find the longest line.
About the Line Counter
A line counter tells you how many lines a block of text or code contains, which is handy for logs, CSV data, lists and source files.
It separates total lines from non-empty and blank lines so you know how much of your text is actual content.
It also counts unique non-empty lines and measures the longest line, which helps when checking for duplicates or overly long rows.
Key features
- Total, non-empty and blank line counts
- Unique line count
- Longest line length
- Instant results in your browser
How to use
- 1Paste or type your text or code.
- 2Line counts update instantly as you type.
- 3Check unique lines and the longest line at a glance.
Examples
three lines with one blank4 lines total, 3 non-empty, 1 blankBlank lines are counted separately from lines with content.
Frequently asked questions
- How are lines counted?
- The text is split on line breaks, supporting Windows (CRLF) and Unix (LF) endings. Each segment between breaks counts as one line.
- What counts as a blank line?
- A line that is empty or contains only spaces or tabs is counted as blank.
- Is my text uploaded anywhere?
- No. Counting happens entirely in your browser, so your text never leaves your device.
Helpful guides
Continue your workflow
Open a related tool to prepare your files or refine the finished result.
- Text ToolsSentence Counter
Count sentences, words and paragraphs, with average words and characters per sentence.
Open tool - Text ToolsDuplicate Line Remover
Remove repeated lines, keeping the first or last, with optional case and space matching.
Open tool - Text ToolsCharacter Counter
Count characters, words, sentences, emojis and syllables, set a custom limit, check readability and see live platform limits.
Open tool
