camelCase
userProfileNameAlso known as: lowerCamelCase, dromedaryCase
Variables and functions in JavaScript, TypeScript, Java, Swift, Kotlin.
A short, opinionated reference to camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE — and when to reach for each.
Most programming languages have a preferred way of writing identifiers. The convention isn't usually enforced by the compiler — it's enforced by the people reading your code. Following the local style keeps a codebase scannable and lets tools (linters, formatters, IDE search) do their job.
userProfileNameAlso known as: lowerCamelCase, dromedaryCase
Variables and functions in JavaScript, TypeScript, Java, Swift, Kotlin.
UserProfileNameAlso known as: UpperCamelCase
Classes, types, components, and interfaces in most C-family languages and React.
user_profile_nameAlso known as: lower_snake_case
Variables and functions in Python, Ruby, Rust, and most SQL identifiers.
user-profile-nameAlso known as: dash-case, lisp-case, spinal-case
URLs, CSS class names, HTML attributes, CLI flags, npm packages.
USER_PROFILE_NAMEAlso known as: SCREAMING_SNAKE_CASE, MACRO_CASE
Constants and environment variables across nearly every language.
Match the language and the surrounding code. Some quick defaults:
camelCase for variables and functions, PascalCase for classes, types, and React components, CONSTANT_CASE for true constants, kebab-case for file names and npm packages.snake_case for variables and functions, PascalCase for classes, CONSTANT_CASE for module-level constants.snake_case for functions and modules, PascalCase for types and traits, CONSTANT_CASE for constants and statics.kebab-case almost everywhere — class names, custom properties, attributes, paths.snake_case for tables and columns; keywords often shouted in UPPER CASE.The converter now ships with camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE alongside the writing-style cases. Paste an identifier or a sentence and switch between styles instantly.
Studies are mixed; snake_case is slightly easier to parse for beginners, camelCase is marginally faster to type. Consistency inside a codebase matters far more than the choice itself.
Only the first letter. camelCase starts lowercase (userName), PascalCase starts uppercase (UserName). Both join words without separators.
Underscores were historically harder to see under link underlines, and search engines treat hyphens as word separators. Hyphenated slugs are easier to read and better for SEO.