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.
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
| Language | Variables | Functions | Classes | Constants | CSS |
|---|---|---|---|---|---|
| JavaScript | camelCase | camelCase | PascalCase | SCREAMING | kebab-case |
| TypeScript | camelCase | camelCase | PascalCase | SCREAMING | kebab-case |
| Python | snake_case | snake_case | PascalCase | SCREAMING | — |
| Go | camelCase | camelCase | PascalCase | — | — |
| Rust | snake_case | snake_case | PascalCase | SCREAMING | — |
| Java | camelCase | camelCase | PascalCase | SCREAMING | — |
| C# | camelCase | PascalCase | PascalCase | PascalCase | — |
| Ruby | snake_case | snake_case | PascalCase | SCREAMING | — |
| PHP | camelCase | camelCase | PascalCase | SCREAMING | — |
| SQL | snake_case | — | — | UPPER | — |
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 transitionsmy_variable_name→ splits on underscoresmy-variable-name→ splits on hyphensMY 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 →