Line Counter & Sorter

Count, sort, reverse, shuffle, and manipulate lines of text.

0 Total Lines
0 Non-blank Lines
0 Blank Lines

How to Use

  1. 1Paste or type your text into the input area.
  2. 2View the total line count, blank lines, and non-empty lines.
  3. 3Check line length statistics like maximum, minimum, and average.
  4. 4Use the line number toggle to display numbered lines for reference.

Frequently Asked Questions

How does the tool count lines?

Each line break (newline character) marks the end of a line. A trailing newline at the end of the text does not add an extra empty line to the count, matching the behavior of most code editors.

Does it count empty lines?

Yes. The tool reports both the total line count and a separate count of blank lines (lines containing only whitespace). You can see the non-empty line count as well.

Can I use this to check code file line counts?

Yes. Paste your code or upload a file to see the total lines, blank lines, and comment lines. This is useful for code metrics and meeting line count limits.