A complete guide to software naming conventions. Master camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE across modern programming languages.
Calculate your numbers instantly in your browser. Fast, free, no signup.
Because spaces are illegal in identifiers across virtually all programming languages, software engineers devised structured conventions to join words while maintaining readability.
Choosing the proper case is not merely an aesthetic preference; in modern software engineering, naming conventions communicate architectural intent, variable scope, class definitions, and type hierarchies.
In camelCase, words are concatenated together with no spaces or punctuation. The very first word begins with a lowercase letter, and every subsequent word starts with a capital letter:
userProfileImagecalculateTotalDiscountisAuthenticationActivePascalCase (named after the Pascal programming language) follows camelCase with one key exception: the very first letter is also capitalized:
UserProfilePaymentProcessorHttpRequestHandler<UserAvatar />).In snake_case, words are written in all-lowercase and joined by an underscore (_):
user_profile_idparse_configuration_filetotal_active_sessionscreated_at, order_status).In kebab-case, words are written in lowercase and joined by a hyphen or dash (-):
user-profile-cardmain-nav-containerbtn-primary-lgdata-tool-id)./blog/mastering-unit-conversions).In CONSTANT_CASE, all letters are capitalized and separated by underscores:
API_BASE_URLMAX_RETRY_ATTEMPTSDEFAULT_TIMEOUT_MS.env keys (DATABASE_URL, JWT_SECRET).| Convention | Pattern Example | Primary Language Ecosystems |
|---|---|---|
| camelCase | getUserData | JavaScript, TypeScript, Java, Dart |
| PascalCase | UserData | React, C#, TypeScript Interfaces, OOP Classes |
| snake_case | get_user_data | Python, Rust, Ruby, SQL Tables |
| kebab-case | get-user-data | CSS Classes, URL Slugs, CLI Flags |
| CONSTANT_CASE | MAX_USERS | Environment Variables, Global Constants |
Converting variable names or lists between snake_case, camelCase, kebab-case, and Title Case by hand is tedious. Paste your text into our free Case Converter to transform your text instantly.