Camel Case Converter
Enter the text you want to convert to camelCase.
Result
How it is calculated
The text is trimmed and split at every run of characters that is not a letter, digit or combining mark in any script: spaces, underscores, hyphens, dots and other punctuation all act as separators, and empty pieces are dropped. Each piece is lower-cased entirely. For camelCase the first word stays lower case and each later word gets a capital first letter; for PascalCase every word, the first included, gets one. The pieces are joined with no separator and the number of words is reported. Accented and non-Latin letters are kept. There is no detection of word boundaries inside an existing camelCase word, so getUserID becomes getuserid. Empty input gives no result.
Worked example
Input: user_first-name total. Splitting on the underscore, hyphen and space gives four words: user, first, name, total. Each is already lower case. camelCase keeps the first as it is and capitalises the rest: userFirstNameTotal. PascalCase capitalises the first one too: UserFirstNameTotal. The tool reports 4 words.
Common mistakes
- Pasting an identifier that is already camelCase, such as getUserID, and expecting it to be split into get, User and ID. It has no separators, so it is one word and comes out as getuserid.
- Expecting acronyms to keep their capitals. Every word is lower-cased first, so API turns into Api, which may differ from a style guide that wants API or HTTP kept upper case.
- Forgetting that digits stay attached to their word.
item_id 2nd placegives a word2nd, and an identifier that starts with a digit is invalid in most languages. - Using accented letters in an identifier. They are kept as they are (café au lait becomes caféAuLait), but many languages and tools only accept plain ASCII names.
- Using the output without checking the language's convention. Some languages want PascalCase for classes and camelCase for functions, while others prefer snake_case.
About this calculator
camelCase (first letter lowercase, each subsequent word capitalized) and PascalCase (every word capitalized, including the first) are the two dominant word-joining conventions in programming, used respectively for variables/functions in languages like JavaScript and Java, and for class and type names in languages like C#, Java, and TypeScript.
Converting free text into either style means first splitting the input on spaces, underscores, hyphens, and punctuation to recover the individual words, then rejoining them with the correct capitalization and no separators. This tool automates that split-and-rejoin so developers can turn a plain phrase, a snake_case identifier, or a kebab-case slug straight into a valid camelCase or PascalCase identifier for their code.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Feeding api response code gives apiResponseCode and ApiResponseCode, and max-retry_count 3 gives maxRetryCount3 with four words counted, so a stray digit glues itself onto the previous word. That helps when you turn column names or labels into JSON keys or variable names. Scan the output for a number you did not mean to keep. Which naming style does your team follow, and do you need snake_case or kebab-case here too?