Case converter
Hello World becomes HELLO WORLD in upper case, and the same text can switch to any of nine styles, from title and sentence case to camel, snake and kebab. Even HTMLParser2 splits cleanly into html, parser and 2. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Text
- Hello World
- Style
- UPPERCASE
- Result
- HELLO WORLD
camel snake title free in browser
Nine styles for prose and for code
Four styles are for ordinary writing. Upper and lower case change every letter. Title case capitalizes the first letter of each word and lowercases the rest, while keeping the exact spacing between words. Sentence case lowercases everything and then capitalizes the first letter of the text and the first letter after each period, question mark or exclamation mark, so it copes with whole paragraphs. The other five styles are the naming conventions used in code and web addresses: camel, Pascal, snake, kebab and constant, which join the words with capitals, underscores or hyphens.
How words are found before they are joined
For the five code styles, the text is first split into words. If it already contains spaces, underscores or hyphens, those mark the breaks, and any other punctuation is removed from each word. If there are no separators, the converter looks for the boundaries inside camelCase and around digits, so HTMLParser2 becomes html, parser and 2 before being joined again. Because every code style uses the same word split, switching a name between snake and kebab loses nothing for plain words. A typical use is turning a product name into a kebab slug for a page address or a file name.
The nine case modes
The tool takes two required fields, text and mode, where mode is one of nine values. upper and lower map straight onto JavaScript's toUpperCase and toLowerCase. title splits the string on whitespace runs and capitalises the first character of each word while lowercasing the rest, preserving the exact spacing between words. sentence first lowercases everything, then capitalises the first Unicode letter and the first letter after every period, question mark or exclamation mark, which makes it robust across multi-sentence paragraphs.
The remaining five modes are programmer identifier styles: camel lowercases the first token and PascalCases the rest, pascal capitalises every token, snake and kebab join lowercased tokens with an underscore or a hyphen, and constant joins upper-cased tokens with an underscore. The requested mode always comes straight back in the response.
How the tokenizer splits identifiers
For the five identifier modes the text is tokenised first. If the string already contains spaces, underscores or hyphens, it is split on runs of those characters; each token then has every non-alphanumeric character stripped and empty tokens are dropped. If there are no separators, the tokenizer instead detects boundaries inside camelCase and around digits: it inserts breaks between a lowercase-or-digit and an uppercase letter, between an acronym run and a following capitalised word, and on either side of a digit sequence.
What you can do with it
Headline formatting
Apply title or sentence case to CMS headings so editors get consistent capitalisation without retyping.
Slug generation
Turn a product name into kebab-case for URL slugs and file names, with punctuation stripped automatically.
FAQ
Which case styles are supported?
Nine: upper, lower, title, sentence, camel, pascal, snake, kebab and constant.
How does it split camelCase input?
When there are no separators it breaks on case changes and digit boundaries, so myVar2 tokenises into my, var and 2.
What does the response contain?
The same input always yields the same output.
How do sentence case and title case differ?
Title case capitalizes the first letter of every word and lowercases the rest, keeping your spacing. Sentence case lowercases everything, then capitalizes the first letter of the text and the first letter after each period, question mark or exclamation mark.
Can I turn a product name into a web address slug?
Yes. Choose the kebab style: the words are lowercased and joined with hyphens, and stray punctuation is stripped, so the result is ready for a page address or a file name.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/text/case-convert \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"hello_world","mode":"camel"}'const res = await fetch("https://api.kit.forhosting.com/text/case-convert", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "hello_world",
"mode": "camel"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/text/case-convert",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "hello_world",
"mode": "camel"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/text/case-convert", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"hello_world","mode":"camel"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"hello_world","mode":"camel"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/text/case-convert", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "hello_world",
"mode": "camel"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "text.case_convert",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_chars | 100000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Transforms a text string into one of nine case styles — upper, lower, title, sentence, camel, pascal, snake, kebab or constant — returning the original mode, text and converted result as JSON.
How the tokenizer splits identifiers
So HTMLParser2 splits into html, parser and 2, meaning snake yields html_parser_2 and constant yields HTML_PARSER_2. Because the same tokenizer feeds every identifier mode, converting a value between snake_case and kebab-case is lossless for plain alphanumeric words, and stray punctuation never leaks into an identifier.
Validation, limits and output shape
Validation runs before any conversion. The input must be a plain object; text must be a string and mode must be one of the nine enum values, otherwise a typed invalid_input error is thrown that names the offending field instead of an untyped crash. text is capped at 100000 characters, and anything longer is rejected so a single oversized payload cannot stall the browser tab or the Worker.
Integration use cases
Normalising identifiers
Convert database column names or JSON keys to camelCase, snake_case or CONSTANT_CASE in bulk during a data migration.
Technical questions
Is there a length limit?
Yes, text is capped at 100000 characters; longer input returns invalid_input.
Is it free?
Yes in the browser (tier A). The API uses prepaid KIT balance from $0.002; failed tasks are not charged.