HandyHex.Handy tools in every shape.
GUIDE · 2 MIN READ

Clean Up Text Fast: Line Breaks, Duplicates, Case and Comparing Versions

Practical ways to fix messy copied text: joining broken lines, removing duplicate lines, changing case and verifying that two versions match.

Why copied text is messy

Text copied from a PDF, a spreadsheet, an email or a chat usually carries formatting baggage. PDFs break a paragraph into one line per visual row. Emails add quote marks and extra blank lines. Lists collect repeated entries as you merge sources. Instead of fixing this by hand, a few small tools solve the most common problems in seconds.

Joining broken lines

When a paragraph was copied from a PDF, every line ends with a break, so pasting it into a document gives a narrow column of short lines. The Remove Line Breaks tool joins them. Choose Space for normal prose. Choose Comma and space to turn a column of items into a single list line, for example when you need to paste names into a form. Choose Nothing only for strings that should be glued together, such as a long code split across lines.

Remember that the tool also drops blank lines, so paragraph breaks are not kept. If you need several paragraphs, clean them one at a time. Words hyphenated at line ends in a PDF, like 'infor-' and 'mation', need a manual fix afterwards.

Removing duplicates

The Duplicate Line Remover tool keeps the first copy of each line and removes the rest, in original order. It is useful for mailing lists, keyword lists, product codes and log entries. Tick the case option when 'Apple' and 'apple' should count as the same. Be aware that lines differing only by a trailing space are treated as different; if you see apparent duplicates surviving, clean up extra spaces first.

For counts rather than removal, paste the list into a spreadsheet and use its pivot or count tools.

Fixing capitalisation

Text typed with caps lock on, or headlines pasted in capitals, are hard to read. The Case Converter offers UPPERCASE, lowercase, Title Case and Sentence case. Sentence case is the best default for body text. For headlines, convert to Title Case, then lower small words ('and', 'of', 'the') if your style guide requires it. Always recheck names and acronyms after a conversion, because lowercasing flattens them.

Checking that two versions match

When a result must be exactly right, such as a licence key, a contract clause or a configuration value, paste both versions into Text Compare. It tells you at once whether they are identical and compares their lengths. If the lengths differ by one, suspect a stray space or a hidden character. This tool says whether the texts match; it does not mark where they differ, so for long documents use a word processor's compare feature.

A reliable cleanup routine

Keep the original. Join lines, remove duplicates, fix case, then compare the result with what you expect. Paste into the final destination and read it once. Cleaning in this order avoids doing work twice, since joined lines make duplicates easier to see, and consistent case makes duplicate detection more accurate.

Try the tools

Keep reading