What this tool does
Soundex is a phonetic algorithm that turns a name into a short code so that words which sound similar map to the same value. It was created for the US Census to group surnames despite spelling variations and misspellings. This encoder produces the standard 4-character Soundex code — one retained first letter plus three digits — entirely in your browser.
How it works
The algorithm keeps the first letter of the name, then codes the remaining letters by sound:
1 = B F P V
2 = C G J K Q S X Z
3 = D T
4 = L
5 = M N
6 = R
ignored = A E I O U Y H W
Three rules refine the result. First, two adjacent letters that share a code count only once (and a letter immediately following the first letter is dropped if it shares the first letter’s code). Second, the letters H and W are transparent: two coded letters separated by H or W still collapse as if adjacent. Third, vowels (A, E, I, O, U, Y) act as separators, so coded letters split by a vowel are kept distinct. The output is the first letter plus three digits, zero-padded if short and truncated if long — for example Robert and Rupert both give R163.
Worked examples
A few names show the rules in action:
| Name | Code | Why |
|---|---|---|
| Robert | R163 | R + B(1) + R(6) + T(3) |
| Rupert | R163 | Same — B≡P(1) and vowels/H/W ignored |
| Ashcraft | A261 | A + S(2) + H transparent, C(2) collapses with S, R(6), F(1) |
| Tymczak | T522 | T + M(5) + C(2) + Z(2), K collapses with Z; vowel separates |
| Jackson | J250 | J + C(2) + S(2) collapses, N(5), zero-pad |
Notice that Robert and Rupert share R163 — which is exactly the point: spelling variants and misspellings that sound the same map to the same code so a search for one finds the other.
When to use Soundex
Soundex was built for surname matching across handwritten census records where enumerators wrote what they heard. It still has practical uses today:
- Genealogy and family history research — searching digitised census and immigration records where spelling is inconsistent.
- Voter roll and civil-registry deduplication — flagging candidate duplicates for human review before merging records.
- Customer-name search — letting a call-centre agent find a customer whose name they heard but do not know how to spell.
- Database record linkage — generating a Soundex index column so a query can join on phonetic similarity without full-text search.
Limits and alternatives
Soundex is intentionally coarse. It collapses many distinct sounds into the same code, so it generates false positives (names that sound different but share a code). It also performs poorly on non-English names and gives no information about how close two names actually sound — just a binary same/different.
For better precision consider:
- Metaphone / Double Metaphone — models English phonetic rules more accurately, with a second code for names with multiple common pronunciations.
- NYSIIS — the New York State Identification and Intelligence System algorithm, tuned for surname matching in that state’s records.
- Jaro-Winkler distance — a string-similarity metric that rewards matching prefixes, well-suited to short names.
Everything runs in your browser; no names are transmitted.