Naming conventions are not preferences β in many contexts they are enforced by linters, compilers, or frameworks. In every other context, following them signals that you understand the ecosystem you are working in.
camelCase
Starts lowercase, capitalises each subsequent word: myVariableName, getUserData. The dominant convention for variables and functions in JavaScript, Java, C#, Swift, and Kotlin.
PascalCase
Capitalises every word including the first: UserProfile, InvoiceGenerator. Convention for class names in Java, C#, JavaScript, TypeScript, and Python. In React, all component names must be PascalCase β lowercase names are interpreted as DOM elements.
snake_case
Lowercase with underscores: user_first_name, calculate_total. Required by Python (PEP 8) for variables and functions. Standard for SQL table and column names in most databases. Highly readable because word boundaries are unambiguous.
kebab-case
Lowercase with hyphens: user-profile, main-content. Convention for CSS class names, HTML IDs, URL slugs, and file names. Cannot be used for JavaScript variable names β hyphens are parsed as subtraction operators.
Converting Instantly
The Text Case Converter handles all eight conventions with one click. Paste any text β a database column name, an English description, a heading β and convert to any format your codebase requires.
Try the Free Tools
14 free, browser-based utilities. No signup, no data stored, no limits.
Explore All Tools β