Character Count by Line (Find Longest, Shortest)

See the length of every line in your text. Useful for code style audits (line length limits like 80, 100, 120), prose review (overlong paragraphs), data quality checks (CSV rows of unexpected lengths). Highlights lines exceeding a configurable threshold.

How to use the Character Count by Line (Find Longest, Shortest)

Paste text and set a highlight threshold. Each line is listed with its character count, any line longer than the threshold is flagged, and the longest and shortest lines are called out so you can find outliers fast.

Auditing line lengths across a block of text

Line length matters in more places than it first seems. Code style guides cap lines at 80, 100, or 120 columns; Git commit subjects and bodies wrap at around 72; and a CSV row of an unexpected width is a sign the data is malformed. Scanning a long block by eye to find the offenders is tedious and unreliable.

This tool lists every line with its character count, flags the ones that exceed a threshold you choose, and identifies the longest and shortest lines outright. For whole-document stats such as words, sentences, and reading time, see Word Counter Pro; to add visible line numbers for referencing specific lines, use the line numberer.

Common use cases

  • Code style audits — find lines that exceed your linter’s column limit.
  • Commit hygiene — catch subject or body lines past the 72-character convention.
  • CSV sanity checks — spot rows that are unexpectedly long or short.
  • Prose review — flag an overlong sentence sitting on a single line.
  • Fixed-width data — verify each record matches an expected length.

Frequently asked questions

What does the threshold control?

Lines longer than the threshold are highlighted so over-limit lines stand out. Set it to match your style guide — 80, 100, or 120 columns are common.

Does the count include whitespace?

Yes. The number is every character on the line, including leading spaces and tabs.

Can it find the longest line for me?

Yes — the longest and shortest lines are identified directly, not just highlighted.

Does it change my text?

No, it only measures. To actually trim or collapse whitespace use the whitespace trimmer.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: