RUNWEBTOOLS
English
Text & Writing

Naming Case Styles: camelCase, snake_case, kebab-case & More

Updated 2026-07-06

Code is full of multi-word names — userName, user_name, UserName, user-name— and the way those words are joined isn't random. Each style, or case convention, signals something and belongs to particular languages and contexts. This guide covers the common ones, what they're called, and where each is used.

Why conventions exist

Most programming languages don't allow spaces in identifiers, so multi-word names need some other way to stay readable. Beyond mere readability, following the convention a language or team expects makes code consistent and predictable — and in some cases the case actually mattersto the language (a capital first letter can mark a class, for instance). Picking the right style isn't about taste; it's about fitting in with the ecosystem.

The common styles

camelCase

First word lowercase, each following word capitalized, no separators — firstName, totalAmount. The “humps” give it the name. Standard for variables and functions in JavaScript, TypeScript, Java, C#, Swift, and Kotlin.

PascalCase (UpperCamelCase)

Like camelCase but the first word is capitalized too — FirstName, UserProfile. By convention it names classes, types, and components across most languages (including React components), which is how a reader instantly tells a type from a variable.

snake_case

All lowercase, words joined by underscores — first_name, total_amount. The default for variables and functions in Python, Ruby, and Rust, and extremely common for database columns.

CONSTANT_CASE (SCREAMING_SNAKE_CASE)

Uppercase snake_case — MAX_RETRIES, API_KEY. Almost universally reserved for constants and environment variables, so a value that never changes stands out at a glance.

kebab-case

All lowercase, words joined by hyphens — first-name, main-content. Named for looking like items on a skewer. You'll see it in URLs, CSS class names, HTML attributes, and filenames. It can't be used for variable names in most languages because a hyphen reads as a minus sign.

Side by side

camelCase        →  userProfileImage
PascalCase       →  UserProfileImage
snake_case       →  user_profile_image
CONSTANT_CASE    →  USER_PROFILE_IMAGE
kebab-case       →  user-profile-image

A quick reference by context

  • JS/TS variables & functions → camelCase
  • Classes, types, React components → PascalCase
  • Python/Ruby/Rust, database columns → snake_case
  • Constants & env vars → CONSTANT_CASE
  • URLs, CSS classes, filenames → kebab-case

Converting between them

Reformatting names by hand — especially a whole list — is tedious and error-prone. Our case converter takes any text and outputs every common style at once, so you can copy the one you need. If you're specifically turning a title into a URL-friendly kebab-case string, the slug generator is purpose-built for that, and for bulk renaming across a block of text a find and replace tool finishes the job. Consistent naming is a small habit that makes any codebase noticeably easier to read.

More in Text & Writing

See all Text & Writing guides →

Tools mentioned in this guide