Text Case Converter
Convert text to camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, sentence case, lower or upper case.
What it is for?What it is for?
Code uses different naming styles in different places: camelCase in JavaScript, snake_case in database columns, kebab-case in URLs and CSS classes, CONSTANT_CASE for environment variables. Type a name once and copy the form you need. All ten forms update as you type.
How words are split
Spaces, hyphens, underscores and dots separate words, and so does a change from a lower case letter to a capital, so userID and user_id both become two words. With the Turkish rules on, i becomes İ and I becomes ı, as Turkish spelling expects.
A run of capitals followed by a word is split before the last capital, so parseHTTPResponse becomes parse, http and response. Other punctuation also counts as a break and is dropped from the result.
An example
user profile image URL gives userProfileImageUrl, UserProfileImageUrl, user_profile_image_url, user-profile-image-url and USER_PROFILE_IMAGE_URL. Note that URL becomes Url. If your code style keeps acronyms in capitals, fix that word by hand.
Gotchas
- Sentence case, lower case and upper case keep your spacing and punctuation. Sentence case lower cases everything except the first letter, so names and acronyms lose their capitals.
- Turn the Turkish rules off for code identifiers. With them on, kayıt tarihi becomes KAYIT_TARİHİ with a dotted İ, which is not ASCII and can break a constant name.
The conversion runs in this tab; the text is not sent anywhere.