Characters Per Line
Paste text to get the length of each line in characters and words, plus the longest, shortest and average. Set a limit to flag the lines that are too long.
Worked examples
Lines against a limit of 8
hello hi there friend
Line 1: 5 characters, 1 word Line 2: 0 characters, 0 words Line 3: 15 characters, 3 words (7 characters over)
The third line is 14 characters, which is 6 over.
About Characters Per Line
Line length matters in more places than you might expect. Subtitles must fit on screen, lyrics and poems are laid out by line, code style guides set a maximum width, commit messages are kept short and fixed width files break if a line is too long. Checking each line by eye is slow, and the lines that cause trouble are the ones you do not notice. This tool measures every line for you.
Paste your text and each line is listed with its number of characters and words. Characters are counted the way people see them, so an accented letter or an emoji counts as one. Summary figures show the number of lines, the longest and shortest line with their line numbers, and the average length of the lines that have text. Set a limit and any line over it is marked with how many characters it goes over by.
How to use Characters Per Line
- Paste your text into the box. Each line break starts a new line.
- Enter a limit in the box if you want long lines flagged.
- Read the summary figures above the list.
- Copy the list to keep a record, or go back to the text and shorten the flagged lines.
Common uses
- Checking subtitle or caption lines against a character limit
- Making sure code or documentation stays within 80 characters
- Laying out lyrics, poems and verse
- Preparing text for a fixed width file or a printed form
Frequently asked questions
How are empty lines treated?
They are listed as zero characters and are left out of the shortest and average figures, so they do not drag the average down.
Are spaces counted?
Yes. Every character on the line is counted, including spaces and tabs, because a limit applies to the whole line.
Do emoji count as one character?
Yes, including emoji made of several parts such as a family or a flag. Each counts as the single symbol you see.
Does the line numbering match my text?
Yes. Line 1 is the first line of what you pasted, so you can go straight to the line that needs shortening.