Handy Tool Online.

Blog

camelCase, snake_case, kebab-case: Naming Conventions

By Handy Tool Online ·

Short answer: camelCase joins words with capital letters, snake_case uses underscores and kebab-case uses hyphens. Choose the style your language or team uses and apply it consistently.

The styles

camelCase: userAccountId. PascalCase: UserAccountId. snake_case: user_account_id. kebab-case: user-account-id. CONSTANT_CASE: USER_ACCOUNT_ID.

Where they are used

JavaScript commonly uses camelCase for variables and PascalCase for classes; Python favours snake_case; CSS and URLs usually use kebab-case, which is also easy to read in web addresses.

Converting names

When moving data between systems with different conventions, a converter saves tedious retyping. Check the result for acronyms such as ID or URL.

Try the tools

FAQ

Which is best for URLs?

Lowercase kebab-case is the most common and readable choice for web addresses.