---
title: "Use this when you need to re-case text into a specific naming or letter case."
method: POST
path: "/v1/convert_case"
tags: ["text"]
---

# Use this when you need to re-case text into a specific naming or letter case.

`POST /v1/convert_case`

## Request

- Base URL: `https://api.clean.tools`
- URL: `https://api.clean.tools/v1/convert_case`
- Auth: none declared

Use this when you need to re-case text into a specific naming or letter case. Given `text` and a target `case` (upper, lower, title, sentence, camel, snake, kebab, or constant), returns the converted string. Smart word tokenization splits camelCase, snake_case, kebab-case, and whitespace, so a phrase in any style re-cases consistently; title case honors an editorial stop-word list and preserves ALL-CAPS acronyms. Empty text returns an empty result. Deterministic: same input, same output. Example: {text: "myVariableName", case: "constant"} -> result "MY_VARIABLE_NAME".

## Request body

- object
  - `text` string, required: The input text to convert.
  - `case` 'upper' | 'lower' | 'title' | 'sentence' | 'camel' | 'snake' | 'kebab' | 'constant', required: Target case: upper (UPPER CASE), lower (lower case), title (Title Case with stop-words), sentence (Sentence case), camel (camelCase), snake (snake_case), kebab (kebab-case), constant (CONSTANT_CASE).

## Response `200`

Structured tool result.

- object
  - `tool` string
  - `result` object
    - `case` string, required: The target case that was applied (echoes the requested `case`).
    - `result` string, required: The converted text. Empty string if the input text was empty.

## Other responses

- `400`: Invalid input or the tool reported an error.
- `413`: Request body exceeds the 128 KB limit.
- `429`: Rate limit exceeded; the response carries Retry-After and RateLimit-* headers — honor them and add jitter.

---

[API](https://skmtc.dev/clean/apis/clean-tools-api.md) · [All operations](https://skmtc.dev/clean/apis/clean-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/clean/apis/clean-tools-api/revisions/a24a01d2833c?raw)
