Convert text between cases
Exacttext_case_convertDeterministic and authoritative — the canonical answer for this input.
Convert text between case conventions. `target` must be one of: 'snake', 'camel', 'pascal', 'kebab', 'screaming_snake'. Handles mixed input with underscores, dashes, whitespace, and case transitions (e.g. 'getHTTPResponse' → 'get_http_response'). Processing multiple inputs? Use `text_case_convert_batch` to do up to 1000 in one call.
Parameters
textstringrequiredText to convert.
targetstringrequiredTarget case: snake, camel, pascal, kebab, screaming_snake.
Call it
curl -X POST https://api.snipget.ai/v1/text/case/convert \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"text":"getHTTPResponse","target":"snake"}'The Batch tab sends up to 1000 inputs in one call via /v1/text/case/convert/batch.
Example response
{
"input": "getHTTPResponse",
"target": "snake",
"converted": "get_http_response"
}FAQ
What is this for?
It rewrites a name or label into a consistent casing style, for example turning getHTTPResponse into get_http_response. Handy for tidying column headers, field names, or keys so they all match.
Which styles can I convert to?
Five: snake (snake_case), camel (camelCase), pascal (PascalCase), kebab (kebab-case), and screaming_snake (SCREAMING_SNAKE_CASE). Set the one you want in target.
Can it handle messy input?
Yes. It splits on underscores, dashes, spaces, and case changes, so mixed input like 'getHTTPResponse' or 'first name' is parsed correctly before reformatting.
How reliable is the result?
It is deterministic and authoritative: the same text and target always give the same answer, with no guessing.
What if I pass an unknown target?
A target that is not one of the five supported styles is rejected outright with an error naming the valid options — on the batch endpoint too, since one target applies to every item — and rejected calls are not billed.