Skip to content
hateitall

Line Counter

Count the lines in a list, a log or a file, and find the longest one, without opening an editor.

Processed locallyIn: Text, TXT, CSV, LOGOut: Line count, Line lengths

Loading tool…

How to use line counter

  1. Paste text or open a file (txt, csv, log, srt and others).

  2. Read the line count, lines with text, blank lines and unique lines.

  3. See the longest line, its length and its line number.

  4. Turn on the list to see the length of every line.

What this tool does

  • Understands Windows (CR LF), Unix (LF) and old Mac (CR) line endings.
  • Does not count a final line break as an extra empty line, matching code editors.
  • Counts unique lines and repeats, so you know whether a list needs deduplicating.
  • Measures line length in visible characters, so an emoji counts as 1.

How the result is verified

The longest line is reported by number; turn on the list to see it highlighted with every other line's length, and compare a few with your editor's column counter.

Frequently asked questions

Does an empty last line count?

No. A line break at the very end of a file finishes the last line rather than starting a new one, which is what code editors and wc -l on a well-formed file show.

What counts as a blank line?

A line that is empty or contains only spaces and tabs.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Delete repeated lines, keep order, ignore case or spaces

Text · TXT · CSV→ TextLight on device

Delete blank lines, or keep one between paragraphs

Text · TXT→ TextLight on device

Live word count with a limit bar, unique words and reading time

Text · TXT file→ Word countLight on device

Characters with and without spaces, code points and UTF-8 bytes

Text · TXT file→ Character countLight on device