xtract.bot

Text case convert

Try it interactively →
POST /api/text-case

Convert text between case styles: camelCase, snake_case, kebab-case, PascalCase, Title Case, CONSTANT_CASE, and more. Handles mixed inputs gracefully.

Converts a string between common case styles. Recognises and emits: - `camelCase` / `pascalCase` - `snake_case` / `screaming_snake` - `kebab-case` / `screaming-kebab` - `Title Case` / `Sentence case` - `lowercase` / `UPPERCASE` / `aLtErNaTiNg` Tokenisation is robust: mixed-case input, embedded numbers, and acronyms (`HTTPRequest` → `http-request`) are handled sensibly.

Inputs

NameTypeDefaultDescription
input*stringText to re-case.
target*enum (camel | pascal | snake | kebab | constant | dot | path | sentence | title | header | no)Target case convention.

Response

Modes: json, text. Cache: yes (24h TTL).

Code samples

Built from the pascal-from-snake example.


curl -X POST https://api.xtract.bot/api/text-case \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
  -H "X-Api-Key: $XTRACT_API_KEY" \
  -d '{
  "input": "my_example_app",
  "target": "pascal"
}'