Writing & Text Utility
Line Counter
Count total, non-empty, and blank logical lines in pasted text.
Count lines
Method
The counter normalizes common line endings to a single LF convention. Empty input is defined as zero lines. Any non-empty input is split at explicit newline characters; a line whose trimmed content is empty is counted as blank. Character count uses the original entered string.
Worked example
The three-line input alpha, a blank line, and beta returns 3 total lines, 2 non-empty lines, and 1 blank line.
When this is useful
Line counts are useful for data files, lists, code snippets, transcripts, writing drafts, and import preparation. Separating blank and non-empty lines makes it easier to spot spacing or record-layout problems before moving text elsewhere.
Privacy
The text is counted locally in the browser and is not sent to a counting service.
Limitations
The tool counts logical newline characters, not visual wrapping. A trailing newline creates a final empty line. Whitespace-only lines are classified as blank after trimming for the blank-line test.
FAQ
Does a wrapped line count twice?
No. A line only changes when the text contains a real line break. Visual wrapping inside the text box does not add a logical line.
What happens with a trailing newline?
A trailing newline represents another line boundary, so it produces a final blank line in the count.
For organizations
If you operate a website, learning resource, agency project, or developer platform and want to evaluate this utility as a maintained embed, see education use cases and developer-platform use cases. PTH Embed is currently a controlled beta with selective qualified tools and aggregate usage metering.
Related tools