# Case converter

Convert text between lower, UPPER, Title, Sentence, camelCase, PascalCase, snake_case, kebab-case and more.

- Endpoint: `POST https://setget.net/v1/tools/case-convert` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `case-convert`
- Page: https://setget.net/tools/case-convert

## Inputs

- `text` (required, string): The text or names to convert.
- `to` (required, string, one of `lower`, `upper`, `title`, `sentence`, `camel`, `pascal`, `snake`, `kebab`, `constant`, `dot`): The case to convert to.

## Example 1

```json
{"input":{"text":"Hello world_fooBar","to":"camel"}}
```

Result:

```json
{"text":"helloWorldFooBar"}
```

## Example 2: Acronyms stay together

```json
{"input":{"text":"HTTPServer error-count","to":"snake"}}
```

Result:

```json
{"text":"http_server_error_count"}
```

## Example 3: Sentence case

```json
{"input":{"text":"the end. a new START","to":"sentence"}}
```

Result:

```json
{"text":"The end. A new start"}
```

**How are words found for camel, snake and the other name styles?** Words are split at spaces, punctuation, underscores and hyphens, and where a lower-case letter is followed by a capital. Each line is converted on its own.

**Why did sentence case lower a name such as "London"?** Sentence case lowers everything and then capitalises the first letter of each sentence. It cannot know which words are names.

**Does title case skip small words like "of"?** No. Every word gets a capital letter.
