About this tool
Paste a list, log or code snippet to see how many lines it has, how many of them are blank, and which line is longest. The average line length helps when checking fixed-width formats or style guides. You can also open a text file straight from your device; it isn't uploaded.
How to use Line Counter
- Paste text or open a file.
- Read the line counts in the tiles.
- Toggle whether a trailing line break counts as an extra line.
Frequently asked questions
Does a final line break add a line?
Editors disagree. By default the final empty line after the last line break is ignored, matching what most people expect; untick the option to count it.
How is line length measured?
In characters as displayed, so an emoji or accented letter counts as one. Tabs count as a single character.