Why Naming Conventions Exist
Every programming team eventually faces the same question: should the variable be named userEmail, user_email, UserEmail, or USER_EMAIL? The answer depends on the language, the context, and the team's conventions.
Naming conventions are not about aesthetics — they are about communication. When everyone on a team follows the same conventions, the name of something tells you what type of thing it is. Constants look different from variables. Class names look different from function names. You can glance at a piece of code and immediately orient yourself.
Inconsistent naming in a codebase is like a book that switches between English and French mid-sentence. Technically readable, but slower and more effortful than it should be.
Every Major Naming Convention Explained
camelCase — First word lowercase, each subsequent word starts with a capital. getUserById, totalOrderCount, isLoggedIn. Used for variable names and function names in JavaScript, Java, C#, and many other languages.
PascalCase (also called UpperCamelCase) — Every word starts with a capital, including the first. UserProfile, ShoppingCart, GetUserById. Used for class names in most object-oriented languages, and for component names in React.
snake_case — All lowercase, words separated by underscores. user_email, total_order_count, get_user_by_id. The standard in Python for function names and variables. Also used in database column names, Ruby, and Rust.
SCREAMING_SNAKE_CASE — All uppercase with underscores. MAX_RETRIES, DATABASE_URL, API_KEY. Used universally for constants and environment variables.
kebab-case — All lowercase, words separated by hyphens. user-profile, main-container, primary-button. Not valid in most programming languages (the hyphen would be interpreted as subtraction), but standard for CSS class names, HTML attributes, URL slugs, and file names.
Title Case — Each word starts with a capital. Used in headings, titles, and displayed text: "User Profile Settings."
UPPERCASE / lowercase — Self-explanatory. Used for SQL keywords (uppercase), file extensions, and abbreviations.
Language Conventions Quick Reference
- JavaScript — camelCase for variables/functions, PascalCase for classes/components
- Python — snake_case for functions/variables, PascalCase for classes, SCREAMING_SNAKE_CASE for constants
- Java / C# — camelCase for variables/methods, PascalCase for classes and interfaces
- CSS — kebab-case for class names and custom properties
- SQL — UPPERCASE for keywords, snake_case for column and table names
- URLs — kebab-case for paths and slugs
- Environment variables — SCREAMING_SNAKE_CASE
Converting Between Formats
Our Text Case Converter transforms any text between all major formats instantly. Paste a sentence or a variable name, and convert to camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, kebab-case, or any standard text case format.
Useful when renaming variables during refactoring, converting database column names to JavaScript property names, or preparing text for different contexts — CSS class, URL slug, or display heading.
Related Topics
Try it yourself
Text Case Converter
Everything in this article is available in the free tool. No account, no subscription, no install.
Open Text Case Converter →