What is camelCase?
camelCase joins words together with no spaces or separators. The first word is written entirely in lowercase and every following word starts with a single capital letter — the capitals form "humps" like the back of a camel, which is where the name comes from.
camelCase examples
- hello world example → helloWorldExample
- user first name → userFirstName
- convert text to camel case → convertTextToCamelCase
Where is camelCase used?
camelCase is the standard naming convention for variables and functions in JavaScript, TypeScript, Java, C# and many other languages. It is also the most common style for JSON object keys and API field names. Because most programming languages treat spaces and hyphens as operators, joined-word styles like camelCase are essential for identifiers.
The camelCase family
camelCase belongs to a family of naming conventions: PascalCase capitalizes the first word too, while snake_case, kebab-case and CONSTANT_CASE keep words separate with underscores or hyphens. Use the sibling converters linked below to switch between them.