UTILS.
Private by default
🔉

Phonetic Encoder (Soundex / Metaphone)

Encode a word or name to its Soundex code so similar-sounding names collide, with an optional Metaphone view for a second phonetic algorithm.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

About this tool

The Phonetic Encoder turns a word or name into a phonetic code so that names that sound alike map to the same value — the trick behind fuzzy name matching, genealogy searches, and de-duplicating spelling variants. The default is American Soundex, a four-character code: it keeps the first letter, then maps the remaining consonants to digits (B,F,P,V→1; C,G,J,K,Q,S,X,Z→2; D,T→3; L→4; M,N→5; R→6) while vowels and H, W, Y map to 0.

The algorithm follows the classic rules exactly. Runs of the same digit that are adjacent, or separated only by H or W, collapse into a single digit, while letters separated by a vowel are encoded separately. All zeros are dropped, the retained first letter is prefixed, and the result is the first three digits right-padded with zeros to length four. This is why Robert and Rupert both encode to R163, and Ashcraft encodes to A261.

Switch the algorithm toggle to Metaphone (or ‘Both’) for a second, more modern phonetic view. Metaphone applies English pronunciation rules — silent-letter dropping, PH→F, TH→0 (theta), SH/TIA/SIO→X, soft versus hard C and G, and so on — producing a variable-length key that often groups homophones more accurately than Soundex for English words. Everything is a deterministic state machine computed locally in your browser; no data is looked up or transmitted.

Frequently asked questions

How does the Soundex encoding work?
Keep the first letter, then code the rest: B,F,P,V→1; C,G,J,K,Q,S,X,Z→2; D,T→3; L→4; M,N→5; R→6; vowels and H,W,Y→0. Collapse repeated digits (including those separated only by H or W), drop zeros, prefix the first letter, and pad or trim to four characters, e.g. Robert→R163.
Why do Robert and Rupert give the same code?
Both start with R and their consonant sequences map to the same digits (b/p→1, r→6, t→3), yielding R163. That collision is the whole point of Soundex: names that sound similar share a code, which is ideal for searching records with inconsistent spelling.
What is Metaphone and how is it different?
Metaphone is a later phonetic algorithm that applies English pronunciation rules rather than a fixed digit table. It handles silent letters, PH→F, TH→0, soft/hard C and G, and more, producing a variable-length key that often matches English homophones more precisely than Soundex.
Does it work on full names or phrases?
Both algorithms encode a single word — non-letter characters are stripped and the word is upper-cased first. For a full name, encode each part (first, last) separately. Everything is computed locally with no external lookup.

More tools