Skip to content
LineOtter

Cleaning up text and lists: counts, duplicates and letter case

How word and character counts are measured, how to remove duplicate lines without losing order, and which letter case to use where.

Checking length against a limit

Forms, essays and social posts usually limit either words or characters. Paste your text into the word counter and watch the number that matters: characters with spaces for most web forms, words for essays.

Different apps count slightly differently. Hyphenated words, emoji and URLs are the usual reasons, so leave a small margin when you are close to a limit.

Removing duplicate lines

Put one item per line, such as email addresses or keywords. The first copy of each line is kept and later repeats are removed, so the order you had stays the same.

Tick Ignore case when “Apple” and “apple” are the same thing for you, such as email addresses. Keep Trim whitespace on so a stray space at the end of a line does not make it look different.

To find what is in one list but not another, use Compare two lists instead.

Choosing a letter case

Text typed with Caps Lock on: Sentence case. Headings and titles: Title Case. Names in code: camelCase for JavaScript variables, PascalCase for types and classes, snake_case for Python and databases, kebab-case for URLs and CSS classes.

Title Case here capitalises every word. Style guides that keep short words like “of” lowercase need a quick manual pass afterwards.

When lines that look the same are not

Two lines can look identical and still be different: one may end with a space, use a non-breaking space or contain a zero-width character copied from a web page. Trim whitespace handles ordinary spaces; for hidden characters, run the text through the invisible character finder first.

Letter case is the other common cause. Email addresses are not case-sensitive in practice, so tick Ignore case for them; product codes and passwords often are, so leave it off.

A clean-up routine for exported lists

Paste the list into the invisible character finder and clean it. Then remove duplicates with Trim whitespace on, and Ignore case if the items are emails. Finally, compare the result with your existing list to see only the new entries. Each step keeps your original order, so the output can go straight back into a spreadsheet column.

Tools for this