Count characters in each line

Per-line character and word counts, with the longest line and any over your limit flagged.

Paste text and press the button. You get a numbered table: for every line, how many characters and how many words it contains, plus a summary with the shortest and longest line. Set a limit and any line over it is marked with how far over it is.

Why a per-line count, not a total

Every word counter on the internet tells you the total. That answers "is my essay long enough" and is useless for the other big category of question: "does any line break a limit". Those are different problems, and the second one is what brings people to a page like this.

Subtitles have a per-line character limit — typically 42 for broadcast, 37 for some streaming specs — and a single line over it fails validation for the whole file. Meta titles get truncated in search results around 60 characters, and if you are preparing fifty of them, you need to know which fifty. Code style guides cap line length at 80, 100 or 120. CSV columns have declared widths. Print layouts have measures. In all of those cases the total is irrelevant and the maximum is everything.

Reading the output

The header gives you the count of lines, the shortest, the longest, and — if you set one — how many lines exceed your limit. Then one row per line: its number, its character count, its word count, and a warning showing the overshoot for lines over the limit.

Line numbers match your input exactly, including blank lines, so you can go back to your source and find the offending line without recounting.

How characters are counted

Characters are counted as displayed: an emoji is one, an accented letter is one, a flag is one. Spaces and punctuation count. Trailing whitespace counts too, which is worth knowing because a line that looks fine can be two characters over thanks to invisible spaces from a spreadsheet copy — the trim button on this page fixes that before you count.

Be aware that some platforms count differently from a person. Certain systems count emoji as two, and social networks give links a fixed weight regardless of length. If you are checking against a specific platform, use the counter built for it: post counter or Instagram counter.

Doing it without this tool

Excel: =LEN(A1) filled down, plus conditional formatting to highlight anything over your limit. Perfectly good if your data is already in a sheet.

VS Code: a ruler at a set column (editor.rulers) shows you visually where the limit is, but does not list which lines cross it.

Command line: awk '{print NR, length}' file.txt prints line numbers with lengths; awk 'length > 42 {print NR": "length}' file.txt shows only the offenders.

Subtitle editors: Aegisub and Subtitle Edit have per-line limit warnings built in, and are the right tool if you are working on an actual subtitle file rather than raw text.

Try:
0Words
0Characters
0No spaces
0Sentences
0Paragraphs
0Lines
0Pages
0Reading
0Speaking

Runs entirely in your browser. Your text is never uploaded — open DevTools, Network tab, and you will see zero requests while you use this tool.

How to use it

  1. Paste your text into the box, keeping the line breaks you want to measure.
  2. Optionally set a limit — 42 for subtitles, 60 for meta titles, 80 for code.
  3. Press "Count each line".
  4. Read the summary at the top, then find flagged lines by their number in your source.

Related tools

Instagram counterLive character count against the real Instagram limits for bio, caption,…Word frequencyRanks every word in your text by how often it appears and shows the top 100.Line counterTotal, non-empty, empty and unique line counts.Vowel counterCounts vowels, consonants, letters and digits in any text.Coin flipHeads or tails in one tap, with a running tally.Meta description lengthWhy 160 characters is a rule of thumb and 920 pixels is the real limit.Magic 8 ballAsk a yes or no question. The ball answers.

See all text tools →

Frequently asked questions

Does it count spaces?

Yes, spaces and punctuation are counted, including whitespace at the end of a line. Invisible trailing spaces are a common reason a line comes out longer than expected — use the trim button first if your text came from a spreadsheet.

What limit should I use for subtitles?

Broadcast guidelines commonly use 42 characters per line, and some streaming specifications use 37. Check the spec you are delivering against, since it varies by platform and language.

Do emoji count as one character?

Here, yes — characters are counted as a person sees them. Some platforms count an emoji as two, so check with a platform-specific counter if you are close to a limit.

Can I see which line is the longest?

The summary shows the longest length, and pressing "Sort longest first" reorders your text so the longest lines are at the top.

Are blank lines included in the numbering?

Yes. Line numbers match your input exactly so you can find any line in your original source.