ForHosting KIT · Developer Utilities

Soundex encoder

Robert and Rupert both become R163: the first letter stays, the next consonant sounds turn into three digits, and short codes are padded with zeros, so names that sound alike land on the same four-character code. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Name
Robert
You get
Code
R163
Normalized
ROBERT
Length
6

American Soundex is the classic U.S. Census and genealogy phonetic index that turns a personal or family name into a four-character code: one retained first letter plus three digits that stand for consonant sound groups. Names that sound alike but are spelled differently—Robert and Rupert, Smith and Smythe—often share the same Soundex code, which is why clerks, family historians, and record-linkage scripts still use it as a first clustering key. This soundex encoder accepts a non-empty name string, normalizes Latin letters, applies the standard digit map and adjacency rules, and returns the code with the normalized letter form used for coding.

How American Soundex builds a letter-plus-three-digits code

Soundex starts by uppercasing the name and keeping only Latin letters A through Z; digits, spaces, hyphens, and punctuation are stripped before coding so a form field with extra spaces still works. The first letter of that normalized string is kept as-is and becomes the leading character of the code.

Every later letter is either mapped to a digit or discarded: B, F, P, and V map to 1; C, G, J, K, Q, S, X, and Z map to 2; D and T map to 3; L maps to 4; M and N map to 5; R maps to 6. Vowels A, E, I, O, U and the letter Y produce no digit.

H and W also produce no digit, but unlike vowels they do not break a run of the same digit code—so Ashcraft and Ashcroft both become A261 after collapsing the S/C group across H. Adjacent letters that share the same digit contribute only once, which is why Jackson becomes J250 rather than a longer string of twos. After at most three digits are collected, missing places are padded with zeros so every successful result is exactly four characters.

Genealogy, records and other everyday uses

Genealogists and local-history projects use a soundex encoder to group census and passenger-list surnames that were recorded with inconsistent spelling. CRM and customer-support tooling can cluster look-alike last names before a human review step without standing up a full fuzzy-search engine. Classroom demos of historical indexing algorithms need a deterministic oracle students can call from a browser while the teacher shows the digit table on the board.

Data-cleaning notebooks can emit Soundex as one feature column next to lowercase and Metaphone columns when building entity-resolution features. Pair with other text utilities only when a later step needs a different phonetic or cipher scheme; keep American Soundex on its own landing so SEO intent stays sharp and the guide remains honest about what the four-character code can and cannot do.

Genealogy and census surname grouping

Cluster family names that sound alike but were spelled differently in historical records by comparing four-character American Soundex codes.

CRM and fuzzy name pre-match

Bucket look-alike customer last names for human review without installing a full entity-resolution stack on every form submit.

How do I encode a name with American Soundex?

The response code field holds the four-character Soundex value (R163 for Robert).

Why do Robert and Rupert share the same code?

Soundex maps similar consonants to the same digits and keeps only the first letter plus three digits, so names that sound alike often collide on purpose for fuzzy matching.

Is the Soundex encoder free?

The browser tool runs free on your device.

Is Soundex the same as Metaphone or NATO phonetic?

No. This tool implements American Soundex only (letter plus three digits). Metaphone, Double Metaphone, and NATO spelling alphabets are different algorithms and landings.

Why do H and W not separate letters the way vowels do?

In American Soundex a vowel between two consonants of the same group lets both count, but H and W do not. That is why Ashcraft becomes A261: the S and the C share a digit and, with only an H between them, count once.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/enc/soundex

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/enc/soundex \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Robert"}'
{
  "name": "Robert"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "enc.soundex",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Empty input, missing name, or a string with no A–Z letters fails with invalid_input so callers can flag blank forms instead of inventing a code. The free browser path and the prepaid API share the same pure parse logic, so homework demos and production pipelines never disagree on Robert versus Rupert.

How American Soundex builds a letter-plus-three-digits code

Because the path is pure character arithmetic with no network and no clock, identical names always yield identical JSON for continuous-integration goldens.

Input contract, empty flags, response shape, and common mistakes

Do not treat Soundex as encryption or as a unique person identifier: many unrelated surnames collide on purpose, and that collision is the feature for fuzzy match, not a bug. Prefer this landing when search intent is soundex encoder, American Soundex, or name phonetic code; NATO phonetic spelling, Metaphone, and general cipher tools answer different intents and stay on separate pages. Accented letters outside pure A–Z are stripped with other non-letters, so feed an ASCII-normalized form if your source data uses diacritics and you need those letters to participate. POST a JSON body with the required string field name set to the person or family name you want to encode. Aliases text, input, value, and s are accepted when clients reuse older form names or shared text widgets. Missing name, a non-string value, a zero-length string, whitespace-only text, or a string that contains no Latin letters at all all raise invalid_input and are not billed on the prepaid API—this is the empty-input flag path the product promises, expressed as a hard validation error rather than a success body with a blank code. On success the response includes code (the four-character Soundex value), method equal to american_soundex so downstream routers can branch without sniffing shapes, name echoing the original string, normalized with the uppercase A–Z sequence actually coded, empty always false on success, and length equal to the original character count before stripping.

Where a Soundex API earns its keep and how pricing works

Call the free in-browser tool for one-off checks and teaching; use the prepaid KIT API when a backend, serverless function, or SDK needs a stable contract under balance at $0.002 per successful item. Validation failures never consume balance after the engine rejects the request. Keep payloads to ordinary name lengths appropriate for a Worker isolate item call—this tool is for names and short labels, not multi-megabyte documents.

Classroom phonetic-index demos

Show students that Robert and Rupert share R163 while empty forms fail cleanly, using the same free browser path as the API.

What happens if the name is empty?

The request fails with invalid_input. Missing, blank, or letter-less input is flagged as empty and is not charged on the prepaid API.

Read the full KIT documentation →