Skip to content
TitleCapitalize

Convert Text to camelCase

A free online camelCase converter for programmers. Paste any string and it converts to camelCase instantly, removing spaces and lowercasing the first word. Useful for JavaScript variables, Java methods, JSON keys, and any context where camelCase is the convention.

Result

Try an example:

How to Use the camelCase Converter

Type or paste your text into the top box. The camelCase output appears in the second field, ready to copy. The two-field layout lets you tweak the original phrase (fix a typo, change a word) and see the converted output update in real time.

Examples: user profile becomes userProfile. HTTP request handler becomes httpRequestHandler. convert-to-camel-case becomes convertToCamelCase. Spaces, hyphens, and underscores are all treated as word separators.

What Is camelCase?

camelCase is a naming convention where compound words are written without spaces, the first word starts with a lowercase letter, and every subsequent word starts with an uppercase letter. The "humps" of the uppercase letters give camelCase its name. firstName, maxRetryCount, and isLoggedIn are typical camelCase identifiers.

It is the standard convention for variable and function names in JavaScript, TypeScript, Java, Swift, and Kotlin, and for local variables and parameters in C#, where methods use PascalCase. Python and Ruby use snake_case for variables instead. CSS and HTML attributes use kebab-case (hyphens). PascalCase (every word capitalized, including the first) is reserved for class names in most languages.

When to Use camelCase

Use camelCase for variable names, function names, parameters, and method names in JavaScript, TypeScript, and Java, and for local variables and parameters in C#. Use it for JSON object keys when working with JavaScript-based APIs. Use it for properties in TypeScript interfaces and React component props.

Avoid camelCase for class and type names (use PascalCase like UserAccount), constants (use SCREAMING_SNAKE_CASE like MAX_RETRIES), file names (depends on framework, often kebab-case or snake_case), and database column names (typically snake_case).

Common Mistakes

Two patterns trip people up. Mixing camelCase with snake_case in the same codebase produces inconsistency that most JavaScript style guides and linters discourage. Capitalizing the first letter turns camelCase into PascalCase, which is reserved for classes and types and will read as a class reference to most readers.

Other Case Converters

For other programming case conventions: snake_case converter, dot.case converter, kebab-case (hyphen) converter. For general text: lowercase, UPPERCASE, sentence case, or Title Case on the homepage. The programming naming conventions guide compares all of them side by side.