Every programming language, framework, and API has its own naming convention. JavaScript uses camelCase for variables and PascalCase for classes. Python uses snake_case everywhere. CSS prefers kebab-case. Database columns tend toward snake_case. Converting between them by hand — especially for multi-word identifiers — is a tedious task that a text case converter handles instantly.

Convert text case online →

The Common Cases

camelCase

Words are joined without spaces. The first word is lowercase; subsequent words start with a capital:

userLoginCount
fetchApiResponse
isAuthenticated

Used in: JavaScript/TypeScript variables and functions, JSON keys, Java methods, Swift properties.

PascalCase (UpperCamelCase)

Same as camelCase but the first word is also capitalized:

UserLoginCount
FetchApiResponse
IsAuthenticated

Used in: JavaScript/TypeScript class names, React component names, C# types, Python class names.

snake_case

Words separated by underscores, all lowercase:

user_login_count
fetch_api_response
is_authenticated

Used in: Python variables and functions, Ruby, PostgreSQL column names, PHP, Rust constants (with SCREAMING variant).

SCREAMING_SNAKE_CASE

Same as snake_case but all uppercase:

USER_LOGIN_COUNT
MAX_RETRY_COUNT
API_BASE_URL

Used in: Constants in most languages — Python CONSTANTS, Java FINAL_FIELDS, environment variables, C/C++ macros.

kebab-case (dash-case)

Words separated by hyphens, all lowercase:

user-login-count
fetch-api-response
is-authenticated

Used in: CSS class names and custom properties, HTML attributes, URL slugs, npm package names, CLI flags.

Title Case

Each word starts with a capital letter:

User Login Count
Fetch Api Response
Is Authenticated

Used in: Blog post titles, page headings, button labels, menu items.

UPPER CASE / lower case

Straightforward uppercase or lowercase transformations — useful for database keys, enum values, or display formatting.

Naming Convention by Language

LanguageVariablesFunctionsClassesConstantsCSS
JavaScriptcamelCasecamelCasePascalCaseSCREAMINGkebab-case
TypeScriptcamelCasecamelCasePascalCaseSCREAMINGkebab-case
Pythonsnake_casesnake_casePascalCaseSCREAMING
GocamelCasecamelCasePascalCase
Rustsnake_casesnake_casePascalCaseSCREAMING
JavacamelCasecamelCasePascalCaseSCREAMING
C#camelCasePascalCasePascalCasePascalCase
Rubysnake_casesnake_casePascalCaseSCREAMING
PHPcamelCasecamelCasePascalCaseSCREAMING
SQLsnake_caseUPPER

Practical Use Cases

API → Code Mapping

REST APIs often use camelCase JSON keys. Python clients expect snake_case variables. When writing a data model or mapper:

Input from API:

{ "userId": 42, "firstName": "Alice", "createdAt": "2026-01-01" }

Python model fields (snake_case):

user_id: int
first_name: str
created_at: datetime

Paste userId, firstName, createdAt into the converter → get user_id, first_name, created_at in one step.

Database Columns → Code Variables

PostgreSQL uses snake_case column names. Convert a list of column names to camelCase for TypeScript interfaces or to snake_case for Python models without typing each one.

Renaming Variables Across a Codebase

When refactoring, you sometimes need to rename a multi-word identifier. Convert the existing name to the target case, then use your editor’s find-and-replace.

URL Slug Generation

Convert a page title like “My Favorite Developer Tools” to my-favorite-developer-tools (kebab-case) for a URL slug.

CSS Custom Property Names

/* From: userPrimaryColor (camelCase from JS) */
/* To: --user-primary-color (kebab-case for CSS) */

How the Converter Works

The converter splits input text on word boundaries — spaces, underscores, hyphens, and camelCase boundaries (uppercase letters preceded by lowercase). This handles mixed input:

  • myVariableName → detects word boundaries by case transitions
  • my_variable_name → splits on underscores
  • my-variable-name → splits on hyphens
  • MY VARIABLE NAME → splits on spaces

Paste any format and get all output cases simultaneously.

Edge Cases to Watch

Acronyms: Some teams write userId (treating ID as a suffix), others write userID (preserving the acronym). Agree on a convention and be consistent. The converter outputs userId by default.

Numbers: item3d or item3D or item_3d? Convention varies. The converter treats digits as word continuations.

Leading/trailing delimiters: _private (Python convention for private attributes) — some converters strip the leading underscore. Know what your tool does.


Stop retyping variable names by hand. Try the Text Case Converter →