Line and Letter Counter

Paste text to count lines, non-empty lines, paragraphs, letters, digits and spaces. Useful for scripts, subtitles and any form that limits characters per line.

Free, no account, and it runs on your device

Lines0
Non-empty lines0
Paragraphs0
Words0
Letters0
Digits0
Spaces0
Characters0

Counting happens as you type and never leaves the tab. Use it before pasting into a form with a character limit.

How to count lines in a text

  1. Paste your text into the box, or type it directly. The counters update on every keystroke.
  2. Read Lines for the raw total and Non-empty lines for the number of lines that contain something.
  3. Check Paragraphs for blocks separated by a blank line.
  4. Use Characters when a form has a hard limit, and Letters when you want to exclude spaces and punctuation.
  5. Press Clear before pasting a new block, so the previous text does not linger.

Lines, paragraphs and the off-by-one trap

Text files usually end with a newline character. That final newline creates an empty line after the last visible line, so “one line of text” plus a trailing newline counts as two. Some editors hide that final newline, some show it as an extra line number, and the same text can appear to have a different line count depending on where you look.

This page reports both totals so the ambiguity is visible. If your text ends with a line break and the result is one higher than expected, that extra line is the reason. For subtitles and code, where the trailing newline is normal, the non-empty count is usually the more useful figure.

A paragraph is separated by a blank line, not by a single line break. That matches Markdown and most word processors. If you paste text that uses a single line break between paragraphs, it will count as one paragraph; add a blank line if the format needs separate blocks.

When a line count matters

  • Subtitles. A subtitle file has one cue per block, often two lines each. Counting lines tells you roughly how many cues the script will need, and where to split a long sentence.
  • Poetry and lyrics. Line breaks are part of the form. A paste from a messaging app often loses them, so check the count before sending.
  • Code and configuration. A quick line count is a rough size check. For real code statistics, a linter or wc -l is more precise, because it can ignore blanks and comments.
  • Form fields. Some address fields or description boxes limit the number of lines as well as characters. Paste, count, then trim.
  • Spreadsheet imports. A file with an unexpected line count usually has an unescaped line break inside a quoted field. Spotting the extra line is the first step to fixing it.

Characters, letters and limits

A form that says “500 characters” counts everything: letters, digits, spaces, punctuation and line breaks. The Characters figure here is the same kind of count, measured on the JavaScript string length, which counts most characters as one and rarer symbols as two. That matches what a browser sends to a server.

The Letters figure excludes spaces and punctuation, which is useful for prose where the limit is about words rather than raw length. It also excludes digits, so a serial number does not inflate it. Devanagari vowel signs and other combining marks are attached to their letter rather than counted separately, so Hindi and Nepali text is not overcounted.

Counting words consistently

Different tools disagree about hyphens and apostrophes. Microsoft Word counts “well-known” as one word, some scripts count it as two, and a few count the hyphen as a character inside a single token. This page treats a hyphen or apostrophe between letters or digits as part of the word, which is the common convention and matches the site's word counter.

Numbers count as words when they stand alone: “2026” is one word. A date written as 14/11/2026 splits on the slashes and counts as three, because the slashes are separators rather than connectors. If you need an exact figure for a publisher, use their tool; word counts are not standardised.

Privacy

The text is never uploaded. Counting runs in the tab, there is no account, and the content is discarded when you close the page. If you paste something confidential, that stays on your device, though your browser's own spellcheck or extensions may behave differently; disable them for sensitive text.

Questions people ask

How are lines counted?

Every line break starts a new line, so a block ending with a newline has one more line than visible text. Empty lines count toward the line total but not toward non-empty lines. That is why both numbers are shown: a subtitle file with 40 lines and 3 blanks has 37 spoken lines.

Is a wrapped line counted as one line?

Yes. Counting is based on the characters you typed, not on how the text wraps in the box. If a long paragraph wraps onto five visual rows, it is still one line until you press Enter.

What counts as a letter?

Letters from any script, including Devanagari. Combining marks that belong to a letter are counted with it, so a Hindi or Nepali word is not inflated by its vowel signs. Digits, punctuation and spaces are counted separately.

How are words counted?

A word is a run of letters, digits, or a hyphen or apostrophe between them. “don’t” is one word, and “well-known” is one. This matches the convention used by the word counter elsewhere on the site, so the two pages agree.

Why do letters and characters differ?

A character count includes spaces, punctuation and line breaks; the letter count does not. A form limit is usually a character limit, so if you are trimming text to fit, watch the total rather than the letters alone.

Can I use this for subtitles?

Yes, it is useful for checking how many subtitle lines a script will need. Broadcast guidelines usually cap both characters per line and lines per minute, so count the lines here and keep each line short.

Is my text uploaded?

No. The text stays in the textarea and is counted in your browser. Nothing is sent to a server and nothing is stored after you close the page.

Updated · 28 Kartik 2083 BS