🗒️ Character occurrence statistics
Paste a piece of text in, count how many times each character appears and what proportion it accounts for, and export it to TXT or CSV.
Character occurrence statistics
Statistical rules: count the number of occurrences of a single character, line breaks are not included in the statistics; the results are arranged from most to least, and the proportion is given; spaces and tabs are marked separately.
total number of characters:0
| ID | character | times | Proportion |
|---|
Instructions for use
Paste the text you want to count into the upper input box, click "Start Statistics", and the number and proportion of each character will be listed below: Chinese characters are counted as one character according to code points, English letters are case-sensitive, punctuation and spaces are in separate lines, and line breaks are not included in the statistics, so the number of lines of multi-line text will not affect the results. The table is arranged from most to least frequently, with the first row showing the characters that appear the most; click "Export TXT" to get a tab-delimited text file, click "Export CSV" to get a comma-delimited file with BOM, and it will not be garbled when opened with Excel. All statistics are completed locally in the browser and are not uploaded or retained.
✅ How to check the results
- Enter abbccc and you should get c 3 times, b 2 times, and a 1 time
- The sum of the number of characters should equal the total number of characters after removing line breaks.
- Spaces and punctuation should be on separate lines
🔒 Data and privacy
Statistics are completed locally in the browser. Inputs and results are not uploaded or retained, and will be cleared when the page is refreshed.
📌 What problem does this tool solve?
When writing copy, you want to know which words are used too frequently, confirm how many times a certain character appears before doing desensitization, check whether there are any extra spaces in the password or number, analyze which words appear repeatedly in the questionnaire text - these all require "counting by character." This tool lists the number of occurrences and proportion of each character in a table, and sorts them from most to least. The characters that appear the most can be seen at a glance.
- Find the most common characters
- Check whether there are too many spaces and punctuation marks
- Check the character composition in the password or number
- Export results for further analysis
⚙️ Statistical rules and examples
Statistics are based on individual characters: Chinese characters are counted as one character based on code points, English letters are case-sensitive, punctuation points and spaces are on separate lines, and newlines are not included in the statistics. Therefore, the number of lines does not affect the results, nor does it split the Chinese characters in half. The table has four columns: serial number, character, frequency, and proportion; the proportion is equal to the number of times of the character divided by the total number of characters participating in the statistics, with two decimal places retained.
| text | result |
|---|---|
| abbccc | c 3 次、b 2 次、a 1 次 |
| Chinese Chinese | 2 hits, 2 hits |
| a b | a、空格、b 1 time each |
🧪 How to check the results
The simplest check is to count the short string by hand: type abbccc, and the result should be c three times, b twice, and a once, for a total of 6 characters. The second method is to look at the total number: add up all the times in the result, and it should be equal to the number of characters in the text after line breaks are removed; if they are not equal, it means that the statistical range is different from expected, and you can check whether spaces or punctuation are regarded as content that should not be counted.
- Use abbccc to verify whether you get 3, 2, 1
- Each addition should equal the total number of characters
- Check whether spaces and punctuation are listed separately
⚠️ Three things to note when using
First, statistics are case-sensitive, and A and a will be counted separately; second, full-width and half-width characters are also counted as different characters. When mixed, two lines will appear, and the width needs to be unified before counting; third, line breaks are not included in the statistics, so the total number in the table will be less than the number of bytes of the text or the number of characters containing line breaks. When checking, the "number of characters after removing line breaks" shall prevail.
🔒 Data and privacy
Statistics are all completed in your browser, and the input content is not uploaded or saved, and will be cleared when you refresh the page; you can also paste it with confidence when analyzing the free text of the questionnaire or internal data.
All keywords and tutorials 12
❓ FAQ
- Will spaces and punctuation be counted?
- Yes, spaces, punctuation, numbers and letters are counted as single characters; only line breaks are not included in the statistics, so the number of lines has nothing to do with the result.
- How are Chinese characters counted?
- Each Chinese character counts as one character and is counted according to its code point. Therefore, one Chinese character only occupies one line of results and will not be split in half.
- How is the proportion calculated?
- The proportion is equal to the number of occurrences of the character divided by the total number of characters participating in the statistics, with two decimal places. For example, 25 occurrences out of a total of 100 times is 25.00%.
- Can the results be exported?
- It can export both TXT and CSV formats. CSV has BOM and will not be garbled when opened with Excel.