Case Converter
All nine cases are computed as you type.
CONVERT THIS TEXT BETWEEN CASES
convert this text between cases
Convert This Text Between Cases
Convert this text between cases
convertThisTextBetweenCases
ConvertThisTextBetweenCases
convert_this_text_between_cases
convert-this-text-between-cases
CONVERT_THIS_TEXT_BETWEEN_CASES
The case converter shows your text in nine cases at once, including the five programming conventions, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE. Each has a copy button, so you can convert an identifier between naming conventions without retyping it.
How it works
The prose cases and the programming cases work differently. Prose cases change letter case while leaving spacing alone; programming cases treat every run of non-alphanumeric characters as a word boundary and rebuild the string from the words.
- Prose: UPPER, lower, Title Case, Sentence case. Spacing and punctuation survive.
- Programming: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE. Spaces, hyphens and underscores all count as separators.
- Because separators are normalised, "user name", "user-name" and "user_name" all produce the same camelCase result.
One consequence worth knowing: converting an existing camelCase identifier to snake_case does not split it, because the converter has no way to tell an intended word boundary from a capital letter inside an acronym.
Examples
A phrase in every programming case
Text
user account settings
Result
userAccountSettings · UserAccountSettings · user_account_settings · user-account-settings · USER_ACCOUNT_SETTINGS
All five derive from the same word split, which is why they stay consistent with each other.
Separators are interchangeable
Text
user-account_settings
Result
Identical output to the spaced version above
Hyphens, underscores and spaces are all treated as word boundaries, so an identifier can be converted from any convention to any other.
Sentence case across two sentences
Text
the first one. the second one.
Result
The first one. The second one.
Sentence case capitalises after each full stop, not only at the start, which is what distinguishes it from simply capitalising the first character.
Frequently asked questions
Why does converting camelCase to snake_case not split the words?
Because the converter treats non-alphanumeric characters as boundaries, and camelCase has none. Splitting on capitals sounds like the fix, but it breaks acronyms. ParseHTTPResponse would become parse_h_t_t_p_response. Type the words with spaces and every convention comes out correctly.
What is the difference between camelCase and PascalCase?
Only the first letter. camelCase starts lowercase and PascalCase starts uppercase; both capitalise every subsequent word. By convention JavaScript uses camelCase for variables and PascalCase for classes and components.
How does this differ from the all caps generator?
The all caps generator covers presentation styles (alternating caps, fullwidth) for social media and decorative use. This one covers the five programming naming conventions alongside the prose cases, for renaming identifiers.
Why does title case capitalise every word?
Because there is no single correct list of words to skip, Chicago, AP and MLA all disagree, including on the length cutoff for short prepositions. Capitalising everything is predictable, and fixing two words by hand beats undoing a guess you disagree with.