Clean and standardize a name
Exactnames_cleanDeterministic and authoritative — the canonical answer for this input.
Clean a single person name field (first or last). Fixes quotes, collapses whitespace, handles Mc/Mac casing, strips noise. Returns a single cleaned string. For full-name parsing into components use names_parse. Processing multiple inputs? Use `names_clean_batch` to do up to 1000 in one call.
Parameters
namestringrequiredSingle name field to clean.
Call it
curl -X POST https://api.snipget.ai/v1/names/clean \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"name":"MCDONALD"}'The Batch tab sends up to 1000 inputs in one call via /v1/names/clean/batch.
Example response
{
"input": "MCDONALD",
"cleaned": "McDonald"
}FAQ
Why not just capitalize the name myself?
Simple title-casing breaks real names. This handles the tricky cases correctly: McDonald and MacLeod keep their inner capital, O'Brien keeps its apostrophe and capital B, and hyphenated names like Garcia-Lopez stay intact.
Is the output consistent every time?
Yes. It is deterministic, so the same input always gives the same cleaned name. You can rely on it as the canonical form when matching records across systems.
What does it NOT do?
It cleans one name field at a time, like a first name or a last name. It does not split a full name into parts. If you have 'John A. Smith Jr.' in one field, use the name parser first, then clean the pieces.
Does it fix spelling or guess the right name?
No. It only fixes capitalization, spacing, and quote characters. It will not correct typos or change which name you typed.
What if the field is empty?
You get back an empty cleaned value rather than an error, so it is safe to run across a whole column even when some cells are blank.