Options
Text
Drop the file to open it
Line lengths
Each line's length appears here as you type.

Paste text or open a .txt or Word file and you'll see the length of every line, right next to the line as you type. Pick a line limit and lines that are too long turn red, with a count of how many there are. You can sort lines by length, export the counts as a CSV, or switch to Wrapped text to break long lines at your limit. Everything runs in your browser.

How to count characters per line

  1. Paste your text into the left pane, or click Open file to load a .txt, .docx, .md, .srt, or code file.
  2. Read each line's length in the margin beside it. The table on the right lists every line with its count and a bar for quick comparison.
  3. Choose a Line limit. Lines over the limit are marked in red in both places, and the badge at the top shows how many there are.
  4. Click a column heading to sort by line number or length, or tick Show only lines over the limit. Click any row to jump to that line.
  5. Download the counts as a CSV, or switch to Wrapped text and copy or download the text wrapped to your limit.

Common line length limits

UseLimitWhy
Subtitles and captions32 to 42 charactersNetflix and the BBC cap a subtitle line at about 42 characters so viewers can read it in time.
Page titlesAbout 60 charactersGoogle usually cuts off titles longer than roughly 600 pixels.
Email and Git commit messages72 charactersPlain-text email and git log are traditionally wrapped at 72 so quoted replies still fit in 80 columns.
Code79, 80, 100, or 120PEP 8 uses 79 for Python. Many style guides use 80, 100, or 120.
Meta descriptionsAbout 155 charactersLonger descriptions are usually shortened in search results.
SMS160 charactersOne text message holds 160 standard characters, or 70 if it contains emoji or other Unicode.
Comfortable reading50 to 75 charactersTypographers recommend this range for body text in print and on the web.

Characters, columns, and bytes

Character counts can differ depending on what's being measured, so the counter offers three units.

  • Characters counts what you see. An emoji, an accented letter, or a family emoji made of several code points each counts as one.
  • Display width counts columns the way a terminal or code editor does. Tabs jump to the next tab stop, and Chinese, Japanese, Korean, and most emoji take two columns. Use this for code and fixed-width text.
  • Bytes counts the UTF-8 size of each line. Use this for database fields, file formats, and systems with byte limits.

Wrapping text to a line length

The Wrapped text view breaks every line longer than your limit at the last space that fits, so words stay whole. A single word longer than the limit, like a long URL, is split only if there's no other way. Lines that already fit and blank lines are left alone, and indentation at the start of a line is repeated on the lines that wrap.

Frequently asked questions

Does the count include spaces?

Yes, by default. Untick Count spaces to count only visible characters, or tick Ignore spaces at line ends to skip trailing spaces, which are invisible but often counted by other tools.

Can I count characters per line in a Word document?

Yes. Open the .docx file and each paragraph is counted as a line. Lines broken with Shift+Enter inside a paragraph count as separate lines. Formatting is ignored.

How do I find the longest line?

The longest line's number and length are shown under the panes. You can also click the Length column heading to sort the longest lines to the top, then click one to jump to it.

Why does an emoji count as one character here but two elsewhere?

Many tools count UTF-16 code units, which is how JavaScript stores text, so an emoji counts as two. This counter counts characters the way you see them. Switch to Bytes or Display width if you need those measurements instead.

Is there a size limit?

No fixed limit. Files with hundreds of thousands of lines work. The table shows the first 5,000 rows for speed, and the CSV export includes every line.

Is my text uploaded anywhere?

No. Text and files are read by JavaScript in your browser and never sent to a server.

Our Full Text Tool Library

Flipper File