Case Converter
Type or paste text and see it in every common case at once, from Title Case to camelCase and snake_case. Copy the one you need.
Text cases
Code cases
How to use
- Type or paste your text. Every case is shown immediately.
- Find the case you need, such as Title Case or snake_case, and press Copy on that card.
- For several names at once, put each on its own line. Every line is converted separately.
- Press Sample to see how a sentence looks in each case.
Example
Input
user profile settings
Output
camelCase: userProfileSettings PascalCase: UserProfileSettings snake_case: user_profile_settings kebab-case: user-profile-settings CONSTANT_CASE: USER_PROFILE_SETTINGS
Common use cases
- Renaming variables, functions and classes when moving between languages or styles.
- Turning a heading or phrase into a URL slug (kebab-case) or a constant name (CONSTANT_CASE).
- Fixing text typed in the wrong case, such as an accidental Caps Lock paragraph.
- Formatting titles and sentences consistently in documents and content.
Common mistakes
- Expecting punctuation to survive in code cases. camelCase, snake_case and similar outputs keep only letters and numbers.
- Expecting Title Case to keep acronyms. Words are lowercased first, so NASA becomes Nasa.
- Treating Title Case and Capitalize Each Word as the same thing. Title Case keeps short words such as of and the in lowercase, unless they start or end the line.
- Mixing conventions in one codebase. Pick the style your language or team uses and apply it consistently.
Frequently asked questions
What is the difference between camelCase and PascalCase?
Both join words without separators and capitalize each word. camelCase starts with a lowercase letter (userName), while PascalCase starts with an uppercase letter (UserName).
Which case should I use for code?
It depends on the language and team. Common conventions are camelCase for JavaScript and Java variables, PascalCase for classes and types, snake_case for Python and Ruby, kebab-case for CSS classes and URLs, and CONSTANT_CASE for constants and environment variables.
How does it split words for code cases?
It splits on spaces and punctuation, on changes from lowercase to uppercase (userName), after acronyms (XMLHttpRequest becomes XML, Http, Request) and between letters and numbers.
How does Title Case treat small words?
Short articles, conjunctions and prepositions such as a, the, and, of and to stay lowercase unless they are the first or last word. Style guides differ, so use Capitalize Each Word if you want every word capitalized.
Is my text uploaded anywhere?
No. Conversion happens entirely in your browser and your text is never sent, logged or stored.