Case Converter: The Ultimate Naming Convention Guide (2026)
Table of Contents
There are only two hard things in Computer Science: cache invalidation and naming
things. And part of naming things is deciding HOW to write them. Should it be
userId, user_id, or UserID?
These "casing conventions" aren't just about aesthetics; they are strict standards enforced by programming languages and communities. Mixing them up (e.g., using snake_case in Java) is a surefire way to look like a novice. This guide covers every major standard you need to know.
camelCase
Format: First letter lowercase, first letter of subsequent words uppercase. No spaces or separators.
const userProfileImage = "url";
function calculateTotalScore() { ... }
Where to use it:
- JavaScript/TypeScript: Variables, Functions, Methods, and Keys in JSON.
- Java: Variables and Methods.
- Golang: Internal (unexported) variables.
snake_case
Format: All lowercase, words separated by underscores (_).
user_profile_image = "url"
def calculate_total_score():
return 100
Where to use it:
- Python: Almost everything (variables, functions, filenames).
- SQL: Database table names (
users_table) and column names (first_name). - Rust: Variables and functions.
kebab-case
Format: All lowercase, words separated by hyphens (-). Also called
"spinal-case" or "lisp-case".
.user-profile-card {
background-color: #fff;
}
// https://example.com/blog/naming-conventions-guide
Where to use it:
- CSS: Class names, ID names, and properties.
- URLs: SEO-friendly slugs (Google prefers hyphens over underscores).
- HTML Attributes:
data-user-id="123".
PascalCase
Format: First letter uppercase, first letter of subsequent words uppercase. Like camelCase, but capitalized start.
class UserProfile { ... }
// React Components MUST be PascalCase
const SubmitButton = () => <button>Go</button>;
Where to use it:
- Classes: In almost every OOP language (Java, JS, Python, C#).
- React/Vue: Component names.
- Golang: Public (exported) variables/structs.
Convert Case Instantly
Paste a list of variables or a paragraph. Convert between camel, snake, pascal, kebab, and title case with one click.
Open ConverterSCREAMING_SNAKE_CASE
Format: All uppercase, words separated by underscores.
const MAX_RETRY_ATTEMPTS = 5;
const API_BASE_URL = "https://api.example.com";
Where to use it:
- Constants: Values that are hard-coded and never change during execution.
- Environment Variables:
DB_PASSWORD,AWS_SECRET_KEY.
Frequently Asked Questions
How can I quickly switch case in VS Code?
Alt+Shift+U for UPPER or Alt+Shift+C for camelCase.
Why does SQL use snake_case?
UserTable and
usertable as the same). Underscores provided a reliable way to separate words
without relying on capitalization.
What is Hungarian Notation?
strName (String Name) or iCount (Integer Count). Modern IDEs show
types on hover, making this redundant and cluttering.
Can I start a variable with a number?
2user is invalid). They must start with a letter, underscore, or
dollar sign (JS).
What about spaces in filenames?
file\ name.txt) and URLs (becoming
file%20name.txt). Always use kebab-case (web) or snake_case (data/scripts) for
files.