Camel Case Converter: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE
What this tool does
Programmers join several words into one name without spaces. The common styles are camelCase (myVariableName), PascalCase (MyVariableName), snake_case (my_variable_name), kebab-case (my-variable-name) and CONSTANT_CASE (MY_VARIABLE_NAME). Which one to use depends on your language, team or file rules. This tool converts a phrase or an existing name into any of them.
It finds the words in your text: letters and numbers form words, and everything else (spaces, hyphens, underscores, punctuation) is a break. A capital letter that follows a lowercase letter or a digit also starts a new word, so an existing name like myVariableName converts correctly. Letters of any language are kept.
The page code runs in your browser and loads no extra library. It cannot check that a result is a valid name in your language, for example one that starts with a digit.
📌 How to use
- Type a phrase such as "user first name", or paste an existing name.
- Press the style you need.
- Press Copy Result.
✨ Features
🔍 Related search terms
Camel Case Converter: inputs, output and examples
This tool converts a phrase or a name into a programming naming style. The page code runs in your browser.
Inputs and output
- Input: a phrase ("user first name") or an existing name (user_first_name, UserFirstName).
- Output: one line in the style you pressed.
Worked examples
From "user first name": camelCase gives userFirstName, PascalCase gives UserFirstName, snake_case gives user_first_name, kebab-case gives user-first-name and CONSTANT_CASE gives USER_FIRST_NAME. From the existing name getHTTPResponse2Go the tool gives get_httpresponse2_go in snake_case, because a capital only starts a new word after a lowercase letter or a digit.
How to use it
- Enter the phrase or name.
- Press a style button.
- Copy the result.
Common mistakes
- Acronyms. HTTP inside a name is lowercased as one word (httpresponse). Fix it by hand if your style keeps HTTP capitals.
- Names that start with a digit. The tool does not change them, but many languages do not allow a digit first.
- Reserved words. The result may match a keyword in your language, such as class. The tool does not check.
Limits
No check of reserved words or of what your language or style guide allows. Punctuation and symbols are dropped. Numbers stay attached to the word before them. The counter counts conversions in this browser only.
Frequently Asked Questions
What is camelCase?
Words joined with no spaces, where the first word is lowercase and each later word starts with a capital, such as userFirstName.
What is the difference between camelCase and PascalCase?
camelCase starts with a lowercase letter, PascalCase starts with a capital.
Which style do I use for constants?
Many teams use CONSTANT_CASE for constants, but this depends on your language and style guide.
Can I convert snake_case to camelCase?
Yes. Paste user_first_name and press camelCase to get userFirstName.
What happens to punctuation?
Spaces, hyphens, underscores and symbols are treated as word breaks and are removed.
Why did HTTP become http?
Each word is made lowercase before the style is applied. Retype acronyms if you want them in capitals.
Does it work with Arabic or accented letters?
Letters are kept. Arabic has no capitals, so the words are only joined.
Is my text uploaded?
The page code does not upload it. The conversion happens in your browser.