Text to group and count

Result

How does it work?

This tool groups identical lines in your text and counts how many times each line appears. The result is displayed as a list with counts and the corresponding lines, sorted either by frequency (default) or alphabetically.

Example of grouping and counting

Original text

apple
banana
apple
cherry
banana
apple
date
cherry
banana
apple

Grouped by frequency

4	apple
3	banana
2	cherry
1	date

Grouped alphabetically

4	apple
3	banana
2	cherry
1	date

This tool is useful for:

  • Analyzing frequency of items in a list
  • Creating histograms or frequency distributions
  • Finding the most common words or phrases in text
  • Summarizing log file entries
  • Identifying patterns in data

Options:

  • Case sensitive comparison: When enabled, "Apple" and "apple" are treated as different lines. When disabled, they are considered the same line.
  • Sort by count: When enabled, lines are sorted by frequency (most frequent first). When disabled, lines are sorted alphabetically.

Note:

Empty lines are ignored in the counting process. The output format is "count [tab] line" for each unique line in the input.

Related Tools

All Tools

See all available tools