camelCase Converter
Convert any text to camelCase — used in JavaScript, Java, and more.
0 words0 chars
0 words0 chars
What is camelCase?
camelCase (also written camel case or camel-case) joins words together with no spaces. The first word is entirely lowercase; each subsequent word starts with an uppercase letter. The name comes from the "humps" created by the uppercase letters.
| Input | camelCase output |
|---|---|
| hello world | helloWorld |
| user first name | userFirstName |
| background color | backgroundColor |
| get user by ID | getUserById |
Where camelCase is used
- JavaScript: variable names, function names, object properties
- Java: variable names, method names
- Swift: variables and functions
- JSON: key names by convention
- React: prop names, event handlers (onClick, onChange)
camelCase vs PascalCase: camelCase starts with a lowercase letter (helloWorld). PascalCase starts with an uppercase letter (HelloWorld). In most languages, camelCase is for variables and functions; PascalCase is for class names and types.
Frequently asked questions
Different style guides handle acronyms differently. This converter treats each word independently, so 'get HTML element' becomes 'getHtmlElement' (not 'getHTMLElement'). Google's Java style guide recommends treating acronyms as regular words for consistency.
'dromedaryCase' is an alternative name for camelCase (lowercase first letter). PascalCase is sometimes called 'CamelCase' with a capital C. The naming is inconsistent across communities — when in doubt, use 'camelCase' (lowercase c) to mean the version starting with a lowercase letter.