Case Converter
Convert identifiers and text to camelCase, snake_case, kebab-case and seven other cases at once.
10 cases · Unicode letters · limit 1 MB
Runs in your browser. Nothing you enter is sent anywhere. How to check
1.How to use
- Paste one identifier, a phrase, or a list with one item per line.
- All ten cases appear as you type, code cases first.
- Press Copy next to the case you need.
Spaces, underscores, hyphens, dots and slashes separate words. Words written together in camelCase or PascalCase are split at each capital letter, so you can convert from any case to any other.
2.Examples
Database columns to camelCase
Paste a list of column names, one per line. With Convert each line separatelyon, user_id, first_name and created_at becomeuserId, firstName and createdAt, still one per line, ready for a JavaScript object or a TypeScript type.
XMLHttpRequest in every case
| Case | Result |
|---|---|
| camelCase | xmlHttpRequest |
| PascalCase | XmlHttpRequest |
| snake_case | xml_http_request |
| CONSTANT_CASE | XML_HTTP_REQUEST |
| kebab-case | xml-http-request |
| dot.case | xml.http.request |
The text cases leave the word as it is written and only change letters, soXMLHttpRequest becomes xmlhttprequest in lowercase.
3.Options explained
Convert each line separately
On (the default): each line is converted on its own and line breaks are kept, so a list of identifiers converts in one step. Blank lines stay blank. Off: the whole input is treated as one phrase, so first and name on two lines becomefirstName.
How words are split
- Spaces,
_,-,.and/separate words. - A small letter followed by a capital starts a new word:
userProfile. - A run of capitals ends before the last capital when a small letter follows:
XMLHttpRequestis XML, Http, Request. - Digits stay with the letters before them:
base64Encodeis base64, Encode. A capital after a digit starts a new word:v2Apiis v2, Api. - Other punctuation and symbols, including emoji, are removed in code cases:
user's id!becomesusers_id.
Text cases
lowercase and UPPERCASE change letters only. Title Case capitalizes the first letter of each word; Sentence case capitalizes the first letter of each sentence. Both lower the other letters but keep words already in capitals with two or more letters, such asID or NASA.
4.Limits
- Input up to 1 MB.
- Acronyms become ordinary words in code cases:
XMLHttpRequestbecomesxmlHttpRequest, notXMLHttpRequest. - Title Case follows no style guide: small words such as
ofandaare capitalized too. Mixed-case words such asiPhonelose their inner capitals in Title Case and Sentence case. - Case mapping does not depend on language. Turkish dotted and dotless i are not handled specially. German
ßbecomesSSin capitals.
5.FAQ
What is the difference between camelCase and PascalCase?
Both join words without separators and start each word with a capital. camelCase starts with a small letter (userProfile); PascalCase starts with a capital (UserProfile).
Which case does each language use?
- JavaScript and TypeScript: camelCase for variables and functions, PascalCase for classes and types.
- Python: snake_case for variables and functions, PascalCase for classes.
- CSS: kebab-case for class names and custom properties.
- SQL: snake_case is common for tables and columns.
- Constants in most languages: CONSTANT_CASE.
These are common conventions; follow your project's style guide where it differs.
How are acronyms handled?
In code cases an acronym is an ordinary word, so XMLHttpRequest becomesxmlHttpRequest and xml_http_request. In Title Case and Sentence case, words already in capitals with two or more letters, such as ID, are kept.
Why did the leading underscore disappear?
Separators at the start or end, as in _private or __init__, are removed in code cases because they do not belong to a word. Add them back by hand if your code needs them.
Is my text uploaded?
No. Conversion runs in your browser. The privacy pageshows how to confirm this in your browser's Network tab.