camelCase converter
Converted in your browser · nothing is uploaded
Converts text to camelCase: the first word lowercase, every following word capitalised, and no separators. `user first name` becomes `userFirstName`.
How to use the camelcase converter
camelCase exists because early programming languages would not allow a space in an identifier and needed some way to keep multi-word names readable. Capitalising the interior words was the compromise, and the name comes from the humps. It is the default for variables and functions in JavaScript, Java, C# (for locals) and Swift, so if you are writing any of those this is the convention you want.
The part converters get wrong is acronyms. parseHTTPResponse or parseHttpResponse? Both are in the wild, and the majority style — used by Google’s and Microsoft’s guidelines — treats an acronym as an ordinary word: parseHttpResponse, userId, xmlHttpRequest. It is more consistent and far easier to convert back, because HTTPResponse is ambiguous about where the word boundary falls while HttpResponse is not.
One thing worth knowing: camelCase and PascalCase differ only in the first letter, and the distinction is load-bearing in several languages. In Go the first letter decides whether a name is exported from its package; in C# the convention is PascalCase for public members and camelCase for locals and parameters. Converting between them is one character, and getting it wrong changes what the code does.
Questions
As ordinary words: parseHttpResponse, not parseHTTPResponse. That is the majority style and it converts back unambiguously.