Clean Before You Group: Why Keyword Grouping Fails on Messy Lists

Keyword grouping is where a keyword list becomes a content plan: each group of related phrases turns into one page. It only works if the list is clean first. When the same keyword turns up three times with different capitals, stray spaces or punctuation, it gets counted three times, filtered inconsistently and sometimes planned as two pages. This guide explains what goes wrong, the order to clean things in, and how to group the result by hand.

I built Keyword Scrubber, the free tool used in this guide, and every result described here was tested against its code in November 2026.

Here’s the practice list for this guide. It’s what a home composting site might collect from Keyword Planner, Google’s autocomplete and a couple of copied web pages, before anyone has tidied it:

Compost Bin
 compost bin
compost bins
"compost bin"
best compost bin uk
compost bin – best
composting for beginners
Composting for Beginners
how to start composting?
hot composting
hot-composting
how long does compost take
how long does compost take?
compost tumbler
worm composting
wormery

The second line starts with a space. Copy the list into Keyword Scrubber if you want to follow along.

Why keyword grouping goes wrong on a messy list

Spreadsheet filters, formulas and keyword tools all work by matching characters. None of them understands meaning, and even your own eye misses a space at the end of a line. A space in front or a pair of quotation marks makes otherwise identical text different, so compost bin, compost bin with a space in front and "compost bin" in quotation marks don’t match. Capitals are less predictable: some spreadsheet functions ignore them and others don’t.

That causes three problems:

  • Groups look bigger than they are. The compost bin topic has six entries in the practice list. Three of them, Compost Bin, the one with a space in front and the one in quotation marks, are the same keyword written three ways. The rest are related phrases that still need a grouping decision.
  • Exact matches fail. Remove Duplicates, a lookup formula or a pivot table treats a version with an extra space or quotation marks as a different keyword, so the repeats survive and the counts come out wrong.
  • Lookalikes end up apart. Sort the raw list A to Z and the version with a space in front jumps to the very top, followed by the one in quotation marks, because spaces and quotation marks sort before every letter. Compost Bin lands below best compost bin uk, away from its twins.

Near-duplicates that split one topic into two groups

Some differences are harder to spot than a capital letter. In the practice list, hot composting and hot-composting are the same search, but a filter for hot composting only finds one of them. The same goes for how long does compost take with and without its question mark.

Leave these alone and you can easily plan two pages for one topic. Two pages aimed at the same search can end up competing with each other in the results, and that’s much easier to prevent at this stage than to fix later.

Plurals are a different matter. compost bin and compost bins aren’t a cleaning problem, because both spellings are correct and both get searched. Whether they belong on the same page is a grouping decision. Cleaning makes identical keywords look identical. Grouping decides which different keywords belong together.

Stray characters, casing and spacing

Almost every mismatch in a raw list comes from one of three sources:

  • Case. Compost Bin and compost bin differ only by capitals. Converting everything to lowercase fixes it.
  • Spaces you can’t see. A space at the start or end of a line stops two keywords matching, and a double space in the middle does the same.
  • Symbols. Quotation marks and square brackets usually come from Google Ads, which uses them to mark match types. Question marks come from autocomplete and People Also Ask, and dashes from copied headings.

Not every symbol should simply be deleted, though. Our guide on how to strip unwanted symbols from a keyword list explains which characters to remove, which to replace and which to keep.

Cleaning in the right order before keyword grouping

The order matters because each step makes the next one reliable. Remove duplicates before you’ve fixed the case and spaces, for example, and the near-duplicates survive.

  1. Save an untouched copy. Work on a duplicate so you can always check what changed.
  2. Cut what you’ll never target. Remove brand names, places you don’t serve and other irrelevant groups first, so you don’t spend time cleaning them. If your list started as a download, our walkthrough on how to tidy up a Keyword Planner download covers this step in detail.
  3. Replace characters that carry meaning. In a spreadsheet, select the keyword column first, then use Find and Replace (Ctrl+H) to change - to a space and & to and. A symbol strip deletes them instead, which joins words together.
  4. Lowercase, strip symbols and trim. Convert everything to lowercase, remove the remaining symbols, then remove spaces from the start and end of each line.
  5. Close up double spaces. Removing a symbol that sat between two spaces leaves both spaces behind. Use Find and Replace to swap two spaces for one, or Excel’s TRIM function, which removes all spaces except single spaces between words.
  6. Sort, then remove duplicates. Use Data, then Remove Duplicates in Excel, or Data, then Data cleanup, then Remove duplicates in Google Sheets.

Doing the clean-up in Keyword Scrubber

Step 4 and the sort in step 6 take a few clicks in the free browser tool. Every button reads from the Input box and writes to the Output box, so click Transfer to Input between steps.

  1. Paste the practice list into the Input box.
  2. Open Change Case, click lowercase, then Transfer to Input.
  3. Open Character Cleanup, click Keep letters and numbers only (strip symbols), then Transfer to Input.
  4. Click Remove leading and trailing spaces, then Transfer to Input.
  5. Open Sort and click Sort A-Z.

To show why steps 3 and 5 of the cleaning order matter, this run skips both of the spreadsheet steps. Here’s the result:

best compost bin uk
compost bin
compost bin
compost bin
compost bin  best
compost bins
compost tumbler
composting for beginners
composting for beginners
hot composting
hotcomposting
how long does compost take
how long does compost take
how to start composting
worm composting
wormery
Keyword grouping starts with a clean list: Keyword Scrubber output showing compost keywords lowercased, stripped of symbols, trimmed and sorted, with the repeats side by side
The practice list after lowercasing, stripping symbols, trimming and sorting. The repeats now sit together, but the joined-up hotcomposting and the double space show the steps this run skipped.

Most of the mess has gone. The three versions of compost bin are now identical and sit together, and so do the two versions of the beginners and how-long keywords. Three problems remain, and each one is a reminder of a step this run skipped:

  • hotcomposting has lost its space, because the hyphen was stripped rather than replaced.
  • compost bin best has two spaces in the middle. The dash was stripped and the spaces either side of it were left together, which step 5 would have fixed.
  • The repeats are still there. They’re easy to see now, but they still need removing.

Keyword grouping by hand once the list is clean

A sorted list is a good start, but it only groups keywords by their first word. As our guide to sorting keyword lists A to Z explains, best compost bin uk and compost bin belong together but sort apart because they start differently.

The Filter section gets you further, because it searches for text anywhere in a line, not just at the start. With the clean list in the Input box:

  1. Type bin into the Filter text box and click Show only lines containing filter. Every compost bin keyword appears together, including best compost bin uk. Copy that group into your plan.
  2. Click Exclude lines containing filter, then Transfer to Input. The bin keywords are now out of the list, so they can’t end up in a second group.
  3. Repeat with the next shared word, such as tumbler or worm, until nothing is left.

The filter doesn’t check for whole words, so bin would also catch cabinet or binding if your list had them. Read each group before you accept it.

Shared words only take you so far. composting for beginners and how to start composting share no useful word, yet one page could answer both, so they belong in one group. The test for every group is simple: could one good page satisfy everyone who searched for these keywords? If it could, it’s one group. If two groups would be best answered by the same page, merge them now.

What the free edition won’t do for you

Keyword Scrubber’s free edition handles case, symbols, trimming, sorting and filtering. It doesn’t do everything on the list above, and it’s worth knowing where the gaps are:

  • It doesn’t remove duplicates. Sorting puts them side by side, but you remove them yourself, by hand or with your spreadsheet’s Remove Duplicates. A paid full version is on the way, which will remove duplicates for you and strip header rows and extra columns from exports.
  • It doesn’t replace characters. Change hyphens and ampersands in a spreadsheet before the strip.
  • It doesn’t close up double spaces in the middle of a line. The trim button only works on the start and end.
  • It treats accented letters as symbols. The strip turns café into caf, so keep accented keywords out of the strip and add them back afterwards.

The Keyword Scrubber user guide explains every button, including what the full version will add. Clean first, group second, and each group you end up with will be a page worth writing.


About the author
Glenn Leader is a web publisher and SEO practitioner based in Kent, and has worked online since 2004. He builds the free keyword and text tools here on PhraseFoundry. You can find more of his work at GlennLeader.com.