All Articles
Text

Duplicate Lines Still Remain? Check Spaces and Case

November 4, 20262 min read

Two lines can look the same while containing different text. Capitalization, leading or trailing spaces and repeated internal spaces are the usual reasons a duplicate remover leaves both rows in place.

Remove Duplicates in Exact Match mode keeping all four North Office variants because case and spacing differ
With Exact Match, all four “North Office” variants stay, because each one differs by case or spacing. Open the duplicate line remover.

Identify the difference first

  • North Office and north office differ by case. Use Case Insensitive.
  • North Office and  North Office  differ at the edges. Use Trim Whitespace.
  • North Office and North  Office have a different number of spaces between words. Use Normalize Spaces, which collapses runs of whitespace and trims the edges.

Each mode applies one rule. Case Insensitive does not trim spaces, and Normalize Spaces does not ignore case. If your list has both problems, run one pass, press the Use output as input button, then run the second mode.

Normalize Spaces mode reduces the four lines to North Office and north office
Normalize Spaces merges the spacing variants but keeps “north office”, because it does not ignore case. A second pass with Case Insensitive would merge it.

Hidden characters from copied files

Text copied from a Windows file or a spreadsheet can carry an invisible carriage return at the end of each line. Two lines that look identical may then differ only by that character. Trim Whitespace and Normalize Spaces both remove it before comparing.

Test a representative sample

Put two ordinary duplicates, one capitalized variant and one spaced variant into a short list. Run your chosen mode and inspect the result. The tool compares normalized text, but the line it keeps is the original, with its own spelling and spacing.

Do not normalize meaningful differences away

Part numbers and case-sensitive identifiers may depend on uppercase versus lowercase. Alphanumeric Only also strips punctuation and non-English letters, so A-100 and A100 become the same key. Start with the narrowest rule that solves your list, then check the removed examples before using the cleaned output.

Open the free duplicate line remover.

remove duplicatesduplicate linestext cleanup