Skip to content
Case Converter Online
en

Camel Case Converter

Convert words, snake_case or kebab-case into camelCase. Paste one name or a whole list, one per line.

Characters
0
Words
0
Sentences
0
Lines
0

Convert to

For code

Runs in your browser. Your text is never uploaded.

What camelCase is

camelCase joins words together without spaces. The first word stays lowercase and every word after it starts with a capital letter:

  • first name becomes firstName
  • total_order_count becomes totalOrderCount
  • is-logged-in becomes isLoggedIn

Programming languages do not allow spaces in names, so developers need a way to show where one word ends and the next begins. camelCase does it with capitals.

How the converter reads your text

The tool works out where the words are, then joins them. It splits on:

  • spaces and tabs
  • underscores, hyphens, dots and slashes
  • a lowercase letter followed by a capital, so UserName is read as “User” and “Name”

It then lowercases the first word, capitalizes the rest and removes the separators. Apostrophes are dropped, so “don’t stop” becomes dontStop. Numbers are kept.

Each line is handled on its own. That makes it easy to convert a column of database fields or a list of JSON keys in one go.

Input Output
user first name userFirstName
order_total_amount orderTotalAmount
background-color backgroundColor
GetUserById getUserById
API response code apiResponseCode

Where camelCase is used

  • JavaScript and TypeScript: variables, functions and object properties
  • Java, Kotlin and Swift: variables and method names
  • JSON: keys in many web APIs
  • C#: local variables and parameters
  • CSS in JavaScript: backgroundColor in place of background-color

Other languages prefer different styles. Python and Ruby use snake_case for variables, and class names in most languages use PascalCase.

Common conversions

snake_case to camelCase. Useful when a Python or SQL backend sends data to a JavaScript frontend. Paste the field names and convert the list.

kebab-case to camelCase. CSS properties and HTML attributes use hyphens. JavaScript needs camelCase to read them, for example data-user-id becomes dataUserId.

Plain words to camelCase. Type a description such as “is email verified” and get a ready variable name.

Camel Case Converter: questions and answers

What is camel case?

Camel case is a way of writing a name made of several words with no spaces. The first word is lowercase and each following word starts with a capital letter, as in firstName or totalOrderCount. The capitals in the middle look like the humps of a camel.

What is the difference between camelCase and PascalCase?

Only the first letter. camelCase starts with a lowercase letter (userName). PascalCase starts with a capital (UserName). PascalCase is sometimes called upper camel case.

How does the converter treat acronyms such as HTML or ID?

Each word is written with one capital followed by lowercase letters, so 'parse HTML string' becomes parseHtmlString and 'user ID' becomes userId. This matches the convention in most modern style guides. If your team writes parseHTMLString, adjust those names by hand.

Can I convert many variable names at once?

Yes. Put each name on its own line. Every line is converted separately and the line breaks are kept, so a list of fifty column names comes back as fifty camelCase names.

More code and data tools

See all tools