camelCase Converter

Convert any phrase into camelCase — first word lowercase, every subsequent word capitalized, no spaces.

Example: user profile background coloruserProfileBackgroundColor

camelCase is a naming convention used in programming where the first word is lowercase and every subsequent word starts with an uppercase letter, with no separators. The name comes from the visual hump-like rise of the capital letters — a row of camels on a string.

It's the default identifier convention in JavaScript, Java, C#, Swift, Kotlin, and TypeScript. JSON keys are conventionally camelCase. AWS API responses use camelCase. Most modern HTML data attributes (read via JavaScript's dataset property) are converted automatically between kebab-case (in HTML) and camelCase (in JavaScript).

When to use it

JavaScript / TypeScript variable names

userId, firstName, computeTaxRate — every JS/TS variable, function, and method name is conventionally camelCase.

JSON keys

Most modern APIs (REST, GraphQL) use camelCase keys in JSON payloads. Strapi, Stripe, AWS, and most SaaS APIs return JSON with camelCase keys.

Java method names

Java standard library and most Java code uses camelCase for method names: setBackgroundColor, getElementById, readFromFile. Class names are PascalCase (different convention).

Database column ⇄ object mapping

ORMs typically convert between database columns (often snake_case) and language-side object properties (camelCase) automatically.

CSS-in-JS

JavaScript's CSSStyleDeclaration uses camelCase for properties — backgroundColor instead of background-color. CSS-in-JS libraries (styled-components, Emotion) follow the same convention.

How the conversion works

The tool splits the input string on any non-alphanumeric separator (spaces, hyphens, underscores, tabs). Each segment is lowercased. The first segment remains lowercase. For every subsequent segment, its first character is uppercased (using toUpperCase()) and the rest lowercased. All segments are then concatenated without any separator. Acronyms are treated as regular words (e.g., "HTML parser""htmlParser"). Possessives lose their apostrophe (e.g., "user's name""usersName"). Hyphenated words are split and each part treated as separate word (e.g., "well-known""wellKnown").

How to use it

  1. Paste or type your phrase into the input box.
  2. Click the "Convert" button — the camelCase result appears instantly.
  3. Copy the output string with the copy button or by selecting the text.
  4. Use the result in your code (JavaScript, Java, C#, etc.) or wherever camelCase is required.

Edge cases this converter handles

Acronyms
Acronyms like 'HTML' are lowercased entirely ('html') then the next word is capitalized — e.g., 'HTML encoder' becomes 'htmlEncoder'.
Possessives
Apostrophes are removed; possessive forms like 'user's profile' become 'usersProfile' (the 's' is kept).
Hyphenated words
Hyphens act as word separators; 'well-known fact' becomes 'wellKnownFact' — each part is treated as a separate word.

Pro tips for case conversion

  • Use for variable names in JavaScript, Java, C#, and TypeScript — always start with a lowercase letter.
  • Keep acronyms consistent: if part of the first word, they become lowercase; otherwise they start uppercase except the first word.
  • When converting multi-word phrases, ensure no stray punctuation remains — the tool strips all non-alphanumeric characters.
  • Combine with a linter to enforce conventions: camelCase for variables, PascalCase for classes.

vs other ways to change case

While you can manually apply camelCase with regex or spreadsheet functions, this tool provides a one-click, accurate solution.

This toolsed commandExcel PROPER()
Capitalization logicIntelligent: first word lowercase, rest capitalized, ignores hyphens/underscoresRequires complex regex: sed -E 's/([a-z]+) ([a-z]+)/\1\u\2/g'Only capitalizes first letter of each word, not camelCase-specific
Ease of useOne click, no command-line knowledge neededSteep learning curve: regex syntax, escaping, multi-word handlingSimple but wrong output (all words capitalized like Proper Case)
Bulk / batch processingSingle string at a time, but fastExcellent for bulk files via pipe (e.g., sed ... file.txt)Requires cell-by-cell formula copy, not ideal for large data

A bit of history

The camelCase convention emerged in the 1970s with the Smalltalk programming language, which used it for variable and method names. It gained widespread adoption in the 1990s with languages like Java and JavaScript, becoming a standard for identifier naming in C-like languages. The term “camelCase” was coined later, referencing the hump-like shape created by uppercase letters in the middle of a word.

Common questions about case conversion

camelCase vs PascalCase — what's the difference?

camelCase starts with a lowercase letter (userName); PascalCase starts with uppercase (UserName). Many languages use camelCase for variables and PascalCase for class names. JavaScript convention: variables and functions are camelCase; classes and constructors are PascalCase.

How are non-letter characters handled?

Spaces, hyphens, underscores, and punctuation are all removed; the next letter after each separator is capitalised. "my-variable_name" and "my variable name" both convert to "myVariableName".

What if my input already has capitalization?

The converter lowercases everything first, then applies camelCase rules. Existing capitalization is normalised away.

Is camelCase used in Python?

Rarely. Python's PEP 8 style guide recommends snake_case for variable and function names; PascalCase for classes. Camel case appears in Python code mainly when interfacing with non-Python APIs that require it.

Why is it called "camel" case?

The capital letters create a visual hump pattern resembling a camel's back. The naming dates from the 1980s; the underlying convention predates that significantly.

Embed our tools on your website

Free for any site. No signup. Iframe loads from our servers and stays up-to-date automatically.

📋 Embed the Word Counter

Copy this snippet (auto-resizes, Copy button works):

Live preview:

📋 Embed this camelCase Converter

Copy this snippet (auto-resizes, Copy button works):

Live preview:

Want more options? All embeddable tools →