How to convert to camelCase
- Paste your words into the top box. Put each name on its own line if you have more than one.
- The camelCase version appears below as you type.
- Copy the result and paste it into your code editor.
It does not matter what format you start with. Plain words, snake_case, kebab-case, CONSTANT_CASE and even PascalCase all convert cleanly.
Examples
| You paste | You get |
|---|---|
| first name | firstName |
| shipping_address_line_2 | shippingAddressLine2 |
| background-color | backgroundColor |
| MAX_RETRY_COUNT | maxRetryCount |
| Get User By ID | getUserById |
Where camelCase is used
- JavaScript and TypeScript: variables, functions and object properties.
- Java, Kotlin and C#: local variables, parameters and method names (C# uses PascalCase for methods).
- JSON APIs: many APIs return keys like
createdAtanduserId. - Swift and Dart: almost everything except type names.
A handy trick for CSS in JavaScript
When you set styles from JavaScript, CSS property names like border-top-left-radius need to become borderTopLeftRadius. Paste a whole list of properties here, one per line, and convert them all at once.
Need a different naming style?
Use the PascalCase converter for class names, snake_case for Python and databases, or kebab-case for URLs and CSS.