camelCase Converter

Turn plain words or other naming styles into camelCase variable names. Paste a list and every line is converted on its own.

How to convert to camelCase

  1. Paste your words into the top box. Put each name on its own line if you have more than one.
  2. The camelCase version appears below as you type.
  3. 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 pasteYou get
first namefirstName
shipping_address_line_2shippingAddressLine2
background-colorbackgroundColor
MAX_RETRY_COUNTmaxRetryCount
Get User By IDgetUserById

Where camelCase is used

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.

Frequently asked questions

What is camelCase?

camelCase joins words together without spaces. The first word is all lower case and every word after it starts with a capital letter, like userName or totalPriceWithTax. The capitals in the middle look a bit like the humps of a camel.

Can I convert snake_case to camelCase?

Yes. Paste first_name or first-name and you get firstName. Underscores, hyphens, dots and spaces are all treated as word breaks.

How are acronyms handled?

Acronyms are treated as a single word, so "XML HTTP request" becomes xmlHttpRequest. This matches most modern style guides, including Google's for Java and JavaScript.

What is the difference between camelCase and PascalCase?

Only the first letter. camelCase starts lowercase (myValue) while PascalCase starts uppercase (MyValue). Some people call PascalCase "upper camel case".