Line Counter
This tool counts the lines in a text. It shows how many hold text and how many are empty, with the longest and average line length.
- Free, no sign-up
- Nothing is sent to a server
- Worldwide
How to use Line Counter online
- Paste the text. Type or paste your text.
- Read the counts. See lines, lines with text and empty lines.
- Check lengths. See the longest and average line.
- Clean up. Remove empty lines with the other tools if you need to.
Why use this free Line Counter
- Line count
- Lines with text and empty lines
- Longest and average line
- All line endings
- Instant result
- Share by link
What a line is
A line is a piece of text that ends at a line break. A text with no breaks is one line. The tool accepts all common line endings, including the ones from Windows, Mac and Linux, and counts each as a single break. A last line with no break after it still counts as a line.
Lines with text and empty lines
A line with only spaces or tabs is counted as empty, because it shows nothing. The tool splits the total into lines with text and empty lines, which helps when you check a list, a log file, a data file or code. It also gives the longest line and the average line length in characters.
A worked example
The sample has 5 lines. Of these, 3 hold text and 2 are empty, one of them with spaces only. The longest line has 10 characters, and the average is 6.40.
Uses
Writers check that a poem or lyrics have the right number of lines. Developers count records in a list or lines in a log. Teachers check a task that asks for a number of lines. To remove empty lines, the remove duplicate lines and remove extra spaces tools do that after you count.
Limits
The count follows breaks you can see in the box. If a long line wraps on your screen because it is wider than the box, it is still one line. The tool counts characters rather than bytes, so a line with emoji or accents may be longer in a file than the count shows.
Using the tool
Change the text or any option of the Line Counter and the answer moves straight away. Find and replace is built into the editor with Ctrl+F and Ctrl+H.
Line Counter: frequently asked questions
How are lines counted?
Is a line with only spaces empty?
Does a wrapped line count twice?
Does it handle Windows line endings?
Is the final line counted if it has no break?
Where does my text go when I use the Line Counter?
Can I copy the Line Counter numbers?
Related searches for Line Counter
- Line Counter online
- free Line Counter
- Line Counter online free
- Line Counter for mobile
- Line Counter without sign up
- Line Counter – Text & Writing Tools
Line Counter is a free online tool on MAITBOX, in the Text & Writing Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.