ConvertCaseTool
Development5 min read

What Is camelCase? A Developer's Guide to Naming Conventions

Naming conventions are one of the first things every developer learns — and one of the most debated topics in code reviews. This guide explains the four major naming conventions, when to use each one, and how to convert between them.

The Four Main Naming Conventions

camelCase

camelCase joins words together with no separator, capitalizing the first letter of each word except the first. The name comes from the "humps" formed by the capital letters, like a camel's back.

getUserName, firstName, isLoggedIn, handleClick, maxRetryCount

Used in: JavaScript, TypeScript, Java, C# (variables, functions, methods)

PascalCase

PascalCase (also called UpperCamelCase) is like camelCase but the first letter is also capitalized. Named after the Pascal programming language.

UserProfile, HttpRequest, ReactComponent, DatabaseConnection

Used in: Class names in most languages, React components, C# methods, TypeScript types/interfaces

snake_case

snake_case separates words with underscores and uses all lowercase letters. The underscores look like a snake on the ground.

user_name, first_name, is_logged_in, max_retry_count

Used in: Python (everywhere), Ruby, Rust, database column names, file names

kebab-case

kebab-case separates words with hyphens and uses all lowercase. The words look like food items on a kebab skewer.

user-profile, my-component, font-size, background-color

Used in: CSS property names, HTML attributes, URL slugs, npm package names

Quick Reference: Which Convention Where?

Language/ContextVariablesFunctionsClassesConstants
JavaScript/TypeScriptcamelCasecamelCasePascalCaseCONSTANT_CASE
Pythonsnake_casesnake_casePascalCaseCONSTANT_CASE
CSSkebab-case--kebab-case
SQL/Databasesnake_casesnake_casePascalCaseCONSTANT_CASE
React ComponentscamelCasecamelCasePascalCaseCONSTANT_CASE
REST API URLskebab-case (/api/user-profiles)

Common Mistakes

  • Mixing conventions in one file — pick one and stick to it
  • Using camelCase in Python — Python strongly prefers snake_case for variables and functions
  • Using snake_case in JavaScript — JS convention is camelCase (except for CONSTANTS)
  • Inconsistent API naming — REST APIs should use kebab-case URLs consistently

How to Convert Between Conventions

Use our free online converters to switch between any naming convention instantly:

Or use the Convert Case Tool to access all formats in one place.

Convert Case Instantly

Switch between camelCase, snake_case, kebab-case, and more with one click.

Open Convert Case Tool →