Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

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.

How to use Line Counter online

  1. Paste the text. Type or paste your text.
  2. Read the counts. See lines, lines with text and empty lines.
  3. Check lengths. See the longest and average line.
  4. 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?
Each line break starts a new line.
Is a line with only spaces empty?
Yes, the tool counts it as empty.
Does a wrapped line count twice?
No. Wrapping on the screen is not a break.
Does it handle Windows line endings?
Yes, as well as Mac and Linux.
Is the final line counted if it has no break?
Yes, it still counts as a line.
Where does my text go when I use the Line Counter?
The Line Counter works locally, and clearing the site data removes anything the editor saved.
Can I copy the Line Counter numbers?
The Line Counter shows its results on the page. Select and copy what you need.

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.

More tools in Text & Writing Tools →

Search tools