Skip to main content

camelCase Converter

camelCase writes a name as one word: the first word is lowercase and every word after it starts with a capital letter, as in userAccountId. This converter turns plain words or names in another case into camelCase, splitting acronyms and dropping punctuation, with one name per line of input.

Universal Text Transformer

Skip to text input
Try an example:

Input

0/100,000characters0lines

Type or paste text. The output updates as you type.

Output

The converted text appears here as you type.

Words
0
Characters
0
Without spaces
0
Lines
0
Sentences
0
Reading time
0 sec

Each line is converted as its own title, so you can paste a list of headlines.

camelCase Converter examples

CaseInputOutput
Wordsuser account iduserAccountId
From snake_caseuser_account_iduserAccountId
AcronymXMLHttpRequestxmlHttpRequest
Acronym in wordsparse HTML stringparseHtmlString
Numbersversion 2 updateversion2Update
Punctuation and accentsIs it café time?isItCaféTime
One name per linefirst name last namefirstName lastName

camelCase Converter rules

  1. The first word is all lowercase; every later word starts with a capital and continues in lowercase. Words are joined with no separator.
  2. Each line becomes one name, so you can convert a list in one pass. Blank lines are kept.
  3. Spaces, punctuation, symbols, emoji, and the separators of other cases (_ - . /) split words and are removed.
  4. A new word also starts where a lowercase letter or digit meets a capital (getUser is get and User) and at the end of a run of capitals (XMLHttp is XML and Http).
  5. Digits stay with the letters before them, so utf8 and h264 stay whole words. In a name written in capitals, a capital after a digit does not start a new word, so 2FA, MP3, and IPV6 stay whole words.
  6. Acronyms are treated as ordinary words (HTML becomes html or Html), so their capitals are not kept.
  7. An apostrophe inside a word is dropped (don't becomes dont). Accented letters and other alphabets are kept.

How camelCase differs from snake_case

camelCase marks word boundaries with capital letters (userAccountId), while snake_case keeps every letter lowercase and puts an underscore between words (user_account_id). Converting between them keeps the words, except that a word starting with a digit in snake_case (version_2_update, enable_2fa) joins the word before it in camelCase (version2Update, enable2fa) and stays joined when converted back (version2_update). Try the same text in the snake_case Converter.

Full comparison with examples: camelCase vs snake_case: Which Naming Convention Should You Use?

How to use

  1. 1

    Type or paste your words, or names in another case, into the editor. Put each name on its own line.

  2. 2

    The camelCase version appears in the output as you type.

  3. 3

    Copy the result into your code, configuration, or file name.

That's it! Your text is transformed and ready to use.

Three simple steps to use camelCase Converter

When to use camelCase Converter

  • JavaScript and TypeScript

    Variable, function, and property names, which are conventionally camelCase.

  • Java

    Method and variable names, which Java naming conventions write in camelCase.

  • JSON and APIs

    Field names in JSON payloads for APIs whose style guide calls for camelCase keys.

FAQ

What is the difference between camelCase and PascalCase?

Only the first letter. camelCase starts with a lowercase letter (userAccount), and PascalCase starts with a capital (UserAccount).

Why does XMLHttpRequest become xmlHttpRequest?

The converter treats an acronym as an ordinary word, so XML becomes xml at the start of the name and Xml after it. That keeps the words the same when you convert the name to another case. Edit the result by hand if your style keeps acronyms in capitals.

Is the result always a valid variable name?

Not always. Digits at the start are kept (2fa code becomes 2faCode), and most languages do not allow a name to start with a digit. Reserved words such as class are not changed either.

Can I convert many names at once?

Yes. Put each name on its own line. Every line converts to one name, and blank lines stay where they are.

Is my text uploaded anywhere?

The conversion runs in your browser, so your text is not uploaded to a server to be converted.