Text Case Converter
Convert text to UPPER CASE, lower case, Title Case, camelCase, PascalCase, kebab-case, and snake_case instantly. Free online tool.
- Runs in your browser
- Your data never leaves your browser
- Free · No Sign-Up
Scan with WeChat to share this tool
Examples, details and FAQ Worked examples, how it compares with other tools, and answers to common questions.
Case Formats Reference
| Name | Example | Common Use |
|---|---|---|
| UPPER CASE | HELLO WORLD | Headings, constants (informal) |
| lower case | hello world | General text normalization |
| Title Case | Hello World | Titles, proper nouns |
| Sentence case | Hello world | Normal prose |
| camelCase | helloWorld | JS variables, JSON keys |
| PascalCase | HelloWorld | Classes, components |
| kebab-case | hello-world | CSS classes, URL slugs |
| snake_case | hello_world | Python, SQL columns |
| CONSTANT_CASE | HELLO_WORLD | Env vars, constants |
Examples
Each row is the tool’s output for the same input. The input getHTTPResponseCode v2 mixes an acronym, camel humps and a version number:
| Format | Output |
|---|---|
| camelCase | getHttpResponseCodeV2 |
| PascalCase | GetHttpResponseCodeV2 |
| kebab-case | get-http-response-code-v-2 |
| snake_case | get_http_response_code_v_2 |
| CONSTANT_CASE | GET_HTTP_RESPONSE_CODE_V_2 |
| Title Case | Gethttpresponsecode V2 |
The digit splits from the letter, so v2 becomes v-2 in kebab-case. In camelCase and PascalCase the two parts are joined again, which is why V2 looks unchanged there. If you need v2 as one word, rename it in the result.
A second input, OAuth2 token expires_in, shows how a mixed-case brand name is split: camelCase gives oAuth2TokenExpiresIn, snake_case gives o_auth_2_token_expires_in. The split happens at the lowercase-to-uppercase change in “OAuth”. Write oauth2 in lower case first if you want oauth_2_token_expires_in.
A list of SQL columns such as user_id, created_at becomes userIdCreatedAt in camelCase: the comma and space are separators like any other punctuation, so all words end up in one identifier.
How Words Are Split
camelCase, PascalCase, kebab-case, snake_case and CONSTANT_CASE first split the input into words, with the same rules as the change-case library’s split with separateNumbers:
- At a lowercase letter or digit followed by an uppercase letter:
userLoginCount→ user, Login, Count. - Before the last capital of an acronym that starts a new word:
XMLHttpRequest→ XML, Http, Request. - Between letters and digits:
base64Encode→ base, 64, Encode. - At any run of spaces, punctuation or symbols:
user-login_count→ user, login, count.
Apostrophes are removed before splitting (as lodash does), so don’t stop → dontStop. Letters from any script and their accents are kept: café au lait → caféAuLait, Привет мир → приветМир.
Limitations
- Title Case and Sentence case keep your spacing and punctuation and do not split identifiers:
userLoginCount→Userlogincount. Title Case capitalizes every word, including short words such as “of” and “the”. - Sentence case capitalizes only the first character of the whole input and lowercases the rest:
first. second sentence! THIRD→First. second sentence! third. Proper nouns and later sentences need manual fixes. - The identifier formats treat line breaks as separators too, so a multi-line list becomes one long identifier. Convert one name at a time, or use Line Tools to clean up a list first. For URL slugs with transliteration of accented letters, use Slugify.
- Acronyms are not kept in capitals in camelCase or PascalCase:
parseHTML→parseHtml. - Case changes use the browser’s default Unicode rules, not a language-specific locale:
ßbecomesSSin CONSTANT_CASE, and Turkish dotted/dotless i is not handled. - Scripts without letter case (Chinese, Japanese, Korean) pass through unchanged; only spaces and punctuation between them become separators.
FAQ
What is camelCase?
camelCase joins words with no separator, capitalizing each word after the first. Example: 'hello world' → 'helloWorld'. Used widely in JavaScript variable names.
What is snake_case?
snake_case joins lowercase words with underscores. Example: 'Hello World' → 'hello_world'. Common in Python and database column names.
What is kebab-case?
kebab-case joins lowercase words with hyphens. Example: 'Hello World' → 'hello-world'. Common for CSS class names. Accented letters stay as they are ('café au lait' → 'café-au-lait'); for an ASCII-only URL slug, use the Slugify tool.
Can I convert an existing identifier such as userLoginCount?
Yes. The tool splits words at case changes, so 'userLoginCount' gives 'user_login_count' and 'XMLHttpRequest' gives 'xml-http-request'. Digits become their own word: 'base64Encode' gives 'base-64-encode'.
Is my text sent anywhere?
No. All conversions run in your browser with JavaScript. Nothing is sent to any server.