← All tools

Text count & clean

Count characters, words and bytes, then choose how to clean your text.

Count and tidy text

Count characters, words and lines, then create a cleaned copy with only the changes you choose.

Up to 256 KiB (262,144 UTF-8 bytes) and 5,000 physical lines. Your input stays unchanged.

UTF-8 only; a file’s leading UTF-8 BOM is removed on load. Pasted U+FEFF characters count as text, and chosen trimming may remove them as whitespace. Downloads add no BOM. The output uses LF for CRLF/CR line endings. A final newline is preserved while lines remain; removing all lines produces empty text.

Enter text or load a file to begin.

Local processing only. No upload, account or persistent storage. Keep your original files.

Worked example

Remove whitespace, blank lines and duplicates from a pasted list

The first line below has spaces around apple, and the second line is blank. Processing order matters even when words look the same.

Example input

 apple 

apple
pear
  1. Paste all four lines. Enable line trimming, blank-line removal and duplicate-line removal.
  2. Check the change counts: one trimmed line, one removed blank line and one removed duplicate.
  3. Compare the source and result, then download the two-line list. For statistics alone, turn off the cleanup options.

What to check in the result

Trimming runs first, so both apple lines become equal and only the two lines below remain. Word and visible-character counts depend on browser language-segmentation support.

apple
pear

Troubleshooting

Why does one emoji count as several characters?
Code points, visible characters and UTF-8 bytes are different measurements. A combined emoji can contain multiple code points. Check which measure the destination requires and compare that statistic.
Why did downloaded line endings change without cleanup?
Output uses LF line endings, and pasting may already normalize line endings in the browser. Keep the original when CRLF or other original bytes must remain exact; do not treat this exported text as a byte-identical copy.