Refined Soundex encoder
Robert becomes R9196: the first letter stays, each consonant sound becomes a digit from a finer table, and nothing is cut to four characters, so long surnames keep their tail. Useful for spotting look-alike names. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Name
- Robert
- Code
- R9196
- Normalized
- ROBERT
- Length
- 6
Refined Soundex is a phonetic indexing variant designed for finer name matching and spell-check style clustering than classic American Soundex. It keeps the first letter of a name, maps every letter through a refined 0–9 consonant table, collapses only adjacent identical digits, and—critically—never truncates the result to four characters. That full-length code retains discriminative digits for longer surnames, so Washington, Ashcraft, and Pfister keep more signal than a letter-plus-three-digits key would. This refined soundex encoder accepts a non-empty name string, strips non-letters, applies the US English refined map used by reference libraries such as Apache Commons Codec, and returns the code with the normalized letter form actually coded.
How Refined Soundex builds a full-length phonetic code
Refined Soundex starts by uppercasing the name and keeping only Latin letters A through Z. Digits, spaces, hyphens, apostrophes, and punctuation are stripped so a form field with extra whitespace still codes cleanly. The first letter of that normalized string is emitted as the leading character of the code.
Then every letter—including the first—is mapped through the refined digit table: B and P map to 1; F and V map to 2; C, K, and S map to 3; G and J map to 4; Q, X, and Z map to 5; D and T map to 6; L maps to 7; M and N map to 8; R maps to 9.
Vowels A, E, I, O, U and the letters Y, H, and W map to 0 and do not append a digit, but they do update the previous-mapping memory so a same-digit run is broken when a zero intervenes. Adjacent letters that share the same non-zero digit contribute only once. Unlike classic American Soundex, there is no pad-to-four and no hard truncate: every remaining coded digit stays in the result.
Where full-length Refined Soundex codes help
Entity-resolution notebooks use refined soundex as a blocking key when classic four-character Soundex collides too aggressively on common surnames and you want longer codes without switching to Metaphone. Spell-check and type-ahead prototypes can group near-miss last names by shared refined prefixes while still distinguishing longer tails that American Soundex would have truncated away. CRM and customer-support tooling can pre-cluster look-alike names for human review without standing up a full fuzzy-search engine.
Classroom demos of historical and library phonetic algorithms need a deterministic oracle students can call from a browser while the teacher contrasts the refined map with the classic census table on the board. Genealogy projects that already know Soundex can add a second column for refined codes when passenger-list and census spellings diverge after the third digit.
Pair with other text utilities only when a later step needs a different phonetic or cipher scheme; keep refined soundex on its own landing so SEO intent stays sharp and the guide remains honest about what a full-length refined code can and cannot do.
What you can do with it
Finer surname blocking than classic Soundex
Group look-alike family names with a full-length refined code when letter-plus-three-digits American Soundex collides too often on common surnames.
CRM and fuzzy name pre-match
Bucket customer last names for human review using refined digit groups without installing a full entity-resolution stack on every form submit.
Classroom phonetic-index demos
Show students that Robert and Rupert share R9196 while empty forms fail cleanly, and contrast full-length refined codes with classic four-character Soundex.
FAQ
How do I encode a name with Refined Soundex?
The response code field holds the full refined Soundex value (R9196 for Robert).
How is Refined Soundex different from classic American Soundex?
Refined Soundex uses a finer consonant digit map and keeps every coded letter instead of padding or truncating to one letter plus three digits. Classic Soundex lives on a separate landing and capability.
Is the Refined Soundex encoder free?
The browser tool runs free on your device.
Is Refined Soundex the same as NYSIIS or Metaphone?
No. This tool implements Refined Soundex only (first letter plus the full refined digit run). NYSIIS, Metaphone, Double Metaphone, and NATO spelling alphabets are different algorithms and landings.
What happens to accents, spaces and hyphens in a name?
Anything that is not a plain letter from A to Z is removed before coding, including spaces, hyphens, apostrophes and digits. Accented letters are dropped too, so write the name without accents if you want those letters to count.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/enc/refined-soundex \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Robert"}'const res = await fetch("https://api.kit.forhosting.com/enc/refined-soundex", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "Robert"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/refined-soundex",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"name": "Robert"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/refined-soundex", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"name":"Robert"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"name":"Robert"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/refined-soundex", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"name": "Robert"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.refined_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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Empty input, a missing name field, or a string with no Latin A–Z letters fails with invalid_input so blank forms are flagged instead of inventing a code. The free browser path and the prepaid API share the same pure parse logic, so demos, tests, and production pipelines always agree on Robert versus Rupert.
How Refined Soundex builds a full-length phonetic code
Because the path is pure character arithmetic with no network and no clock, identical names always yield identical JSON for continuous-integration goldens and multi-region edge runs.
Input contract, empty flags, response shape, and common mistakes
Do not confuse this landing with classic American Soundex: that tool pads and truncates to one letter plus three digits and uses a coarser digit grouping; Refined Soundex uses a split consonant map (for example B/P versus F/V, and C/K/S versus G/J versus Q/X/Z) and keeps every coded letter for finer discrimination. Prefer this page when search intent is refined soundex encoder, refined soundex code, or full-length phonetic name index; classic soundex, NYSIIS, NATO spelling, 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 in the code. 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 full refined Soundex value), method equal to refined_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 Refined 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.
Technical questions
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.