Three styles. Three ecosystems. One underlying idea: how do you write"user full name" as a single identifier when your language doesn't allow spaces? We ended up with camelCase, snake_case, and kebab-case — all common, none universal.
camelCase — the compact one
userFullName. The first word is lowercase, each subsequent word capitalized. Named for the "humps" in the middle. Originated in Smalltalk in the 1970s, then picked up by Java, JavaScript, and anything in that lineage. Works in any language because it uses only letters and digits — no reserved characters to trip on.
Used by: Java, JavaScript, TypeScript, C#, Swift, Kotlin, Objective-C.
snake_case — the readable one
user_full_name. Words separated by underscores. Easier to read than camelCase — underscores look like spaces, so identifiers scan more naturally. Standard in Python (PEP 8, 2001), Ruby, Rust, and most database conventions.
Used by: Python, Ruby, Rust, Perl, most SQL, PostgreSQL, JSON APIs in Python-centric ecosystems.
kebab-case — the URL one
user-full-name. Words separated by hyphens. Can't be used as a variable name in most programming languages because the hyphen is the subtraction operator — but it's dominant for URLs, CSS classes, HTML attributes, and CLI flags.
Used by: CSS, URL slugs, HTML attributes, CLI flags, many file names, Lisp dialects.
The asymmetry
Here's the part that causes real pain: ecosystems often mix conventions, and you have to translate. A JavaScript frontend fetches JSON from a Python backend — the JS code expects firstName, the Python API returns first_name. A CSS rule uses background-color, but setting it from JavaScript uses element.style.backgroundColor. Most frameworks include automatic translation because nobody wants to retype field names 200 times.
Other styles worth knowing
- PascalCase — like camelCase but first letter capitalized. Classes, React components, types.
- SCREAMING_SNAKE_CASE — all caps with underscores. Constants and env vars.
- dotted.case — uncommon, used for config paths and some file organization.
- Train-Case — like kebab-case but each word capitalized. Used in HTTP headers ("Content-Type").
camelCase ↔ snake_case ↔ kebab-case ↔ 10 more, live in your browser.

