Naming conventions by language
| Convention | Example | Typical use |
|---|---|---|
| camelCase | userProfilePicture | JavaScript, Java and C# variables and methods; JSON keys |
| PascalCase | UserProfilePicture | Classes, types, React components, C# methods |
| snake_case | user_profile_picture | Python, Ruby, Rust variables; SQL columns |
| CONSTANT_CASE | USER_PROFILE_PICTURE | Constants and environment variables |
| kebab-case | user-profile-picture | URLs, CSS classes, file names, CLI flags |
| dot.case | user.profile.picture | Config keys, translation keys |
Frequently asked questions
What is the difference between camelCase and PascalCase?
Both join words without spaces and capitalise each word, but camelCase starts with a lower-case letter (userName) and PascalCase starts with a capital (UserName). JavaScript uses camelCase for variables and functions and PascalCase for classes and React components.
When should I use snake_case or kebab-case?
snake_case is standard for Python variables and functions, Ruby, and most SQL column names. kebab-case is used for URLs, CSS class names, HTML attributes and file names, but cannot be used for variable names in most languages because the hyphen means minus.
How does the converter split words?
It splits on spaces, underscores, hyphens, dots and slashes, and on case changes inside a word, so "parseHTTPResponse" becomes parse, HTTP and Response. Acronyms stay together as one word.