Menu

Developer Reference Naming Conventions March 2026 ⏱ 9 min read

The Complete Guide to Text Case Formats: camelCase, snake_case, and More

Case conventions carry meaning, signal identifier type, and affect interoperability between systems. Every format explained, with examples, rules, and a quick-reference table for every context.

Text case conventions seem like a minor detail until you are integrating a Python backend with a JavaScript frontend, adapting SQL column names to TypeScript interfaces, or working on a team where inconsistent naming has made the codebase hard to read. Case conventions are not arbitrary style preferences. They carry meaning, signal the type of identifier you are looking at, and affect interoperability between systems.

Why Case Conventions Matter

Most experienced developers can scan a line of code and immediately know what kind of identifier they are looking at, before reading the context, because naming conventions encode that information directly. This is not accidental:

👁️
Readability through convention
UserProfile is a class. getUserProfile() is a function. user_profile_id is a database column or Python variable. USER_PROFILE_TABLE is a constant. The case tells you the type before you read the surrounding code.
🔌
Cross-system interoperability
APIs, databases, and frontend code run in different languages with different conventions. When the API returns user_id (Python/SQL convention) but the frontend expects userId (JavaScript convention), a mismatch produces silent bugs.
📖
Language standards compliance
Most languages have official or community-standard naming conventions. PEP 8 for Python. Google Style Guide for JavaScript. Following them makes your code immediately readable to any developer familiar with that language and signals professionalism to reviewers.

Case is not cosmetic. A developer who violates naming conventions in a new codebase is not just inconsistent. They are adding cognitive overhead to every future reader of that code.

Every Case Format Explained

Nine formats cover the full range of what you will encounter in professional development. Each has a specific niche:

UPPERCASE
single-word
All letters capitalised, no word separators. Used for single-word identifiers where emphasis or constant-like meaning is needed.
STATUS NAME ACTIVE
Used in
SQL keywords Abbreviations Headings
lowercase
single-word
All letters lowercase, no separators. For single-word identifiers and text normalisation contexts.
status name active
Used in
Domain names CSS properties Text normalisation
Title Case
writing
First letter of each major word capitalised. Articles, conjunctions, and prepositions (a, the, and, of) are typically not capitalised unless first.
How To Format JSON The Best Dev Tools
Used in
Page titles Article headlines Navigation labels Book titles
Sentence case
writing
Only the first letter of the first word capitalised. Reads like a natural sentence. Used for descriptive, conversational text.
How to format json online
Used in
Body text Meta descriptions Subtitles Captions
camelCase
programming
First word lowercase. Each subsequent word starts with a capital letter. No spaces or separators. The "hump" in the middle gives it the name.
myVariableName getUserById isActiveUser
Used in
JavaScript vars TypeScript Java Swift Kotlin
PascalCase
programming
Every word capitalised including the first. Also called UpperCamelCase. No spaces. Visually distinct from camelCase because it starts uppercase.
UserProfile LoginButton GetUserById
Used in
Class names React components TS interfaces .NET
snake_case
programming
All lowercase. Words separated by underscores. The standard in Python (PEP 8) and the most common format for database column names across all SQL dialects.
user_name get_user_by_id created_at
Used in
Python (PEP 8) Ruby SQL columns API fields
SCREAMING_SNAKE
programming
All uppercase. Words separated by underscores. The universal standard for constants and environment variables across most languages.
MAX_RETRY_COUNT DATABASE_URL JWT_SECRET_KEY
Used in
JS constants Python constants Env variables
kebab-case
web
All lowercase. Words separated by hyphens. The standard for anything that appears in a URL or HTML attribute, as hyphens are the web's word separator.
nav-menu-item user-profile-card json-formatter
Used in
CSS classes HTML attributes URL slugs CLI flags

The Interoperability Problem — and Why It Matters

The most common real-world case convention problem is not within a single language. It is at the boundary between systems. A Python backend follows snake_case. A JavaScript frontend follows camelCase. A PostgreSQL database follows snake_case for columns. A REST API response might use either.

Here is what the same "user ID" field looks like across a typical full-stack application:

The same field — five representations across one stack
PostgreSQL
user_id
← snake_case (SQL standard)
Python ORM
user_id
← snake_case (PEP 8)
REST API
userId
← camelCase (JSON convention for JS clients)
JavaScript
userId
← camelCase (JS standard)
TypeScript type
userId: number
← camelCase in interface

When the API returns user_id (Python convention) and the frontend accesses response.userId (JavaScript convention), the result is undefined, silently, with no error. This is one of the most common integration bugs in full-stack development, caused entirely by case convention mismatch.

🔧 The conversion tool for boundary work

When adapting field names between systems with different conventions, the Case Converter handles any transformation instantly. Convert user_first_name to userFirstName, UserProfile to user-profile, or any other combination. Paste the field names once, convert to any format.

Quick Reference — Context to Convention

Bookmark this table. It maps every common development context to the correct convention:

Context Convention Example
JavaScript variablecamelCaseuserName
JavaScript functioncamelCasegetUserById()
JavaScript classPascalCaseUserProfile
JavaScript constantSCREAMING_SNAKE_CASEMAX_RETRIES
React componentPascalCaseLoginButton
TypeScript interfacePascalCaseUserPreferences
TypeScript type aliasPascalCaseApiResponse
Python variablesnake_caseuser_name
Python functionsnake_caseget_user_by_id()
Python classPascalCaseUserProfile
Python constantSCREAMING_SNAKE_CASEMAX_CONNECTIONS
SQL columnsnake_casecreated_at
CSS class namekebab-casenav-menu-item
HTML data attributekebab-casedata-user-id
URL slugkebab-case/json-formatter
Environment variableSCREAMING_SNAKE_CASEDATABASE_URL
CLI flagkebab-case--output-format
Page titleTitle CaseHow to Format JSON
Meta descriptionSentence caseLearn how to format json online

Frequently Asked Questions

What is the difference between camelCase and PascalCase?

In camelCase, the first word is lowercase and each subsequent word starts with a capital: myVariableName. In PascalCase, every word is capitalised including the first: MyVariableName. PascalCase is used for classes, types, and React components. camelCase is used for variables, functions, and object properties.

Why does Python use snake_case instead of camelCase?

PEP 8, the official Python style guide, specifies snake_case for variable and function names. The reason is readability: get_user_by_id is considered more readable than getUserById in Python's design philosophy. Python classes use PascalCase, consistent with most OOP languages.

Why does CSS use kebab-case for class names?

CSS class names cannot contain underscores as meaningful separators (they are valid but confusing), and camelCase and PascalCase require you to remember capitalisation. kebab-case was established early in CSS tooling and is now the universal standard. It also aligns with HTML attributes (which are lowercase) and URL slugs (which use hyphens as word separators per Google's URL guidance).

Should I use Title Case or Sentence case for headings?

It depends on context and house style. Title Case is traditional for article headlines, book titles, and formal headings. Sentence case has become more common in modern product writing, SaaS UIs, and blog posts because it reads more naturally and conversationally. Many style guides (Google, Apple, Microsoft) now recommend Sentence case for UI copy and documentation.

What happens when two systems with different conventions exchange data?

If a Python API returns user_id and a JavaScript frontend accesses response.userId, the result is undefined, silently, with no error. This is one of the most common integration bugs in full-stack development. The solution is to normalise at the API boundary: either use a serialiser that outputs camelCase from the Python backend, or write a client-side mapping layer that converts field names on receipt.

Free browser-based tools

Convert text to any case format instantly

Paste your text once and convert it to camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE_CASE, Title Case, or Sentence case. No login, no setup.

Conventions Are Communication

Case conventions are not a matter of taste. They are a shared language. When every developer on a team follows the same conventions, code becomes self-documenting. The case of an identifier tells you its type, its language, and its layer of the stack before you read a single character of its name.

The interoperability angle matters just as much. A case mismatch at a system boundary, user_id from the API with userId expected by the frontend, is one of the most common silent bugs in full-stack development. Understanding which convention each layer uses, and converting deliberately when you cross a boundary, eliminates an entire class of integration failures.

Use the quick reference table above whenever you are writing in an unfamiliar context. Use the Case Converter when you need to adapt field names between systems. And when in doubt: camelCase for JavaScript, snake_case for Python, PascalCase for classes, SCREAMING_SNAKE_CASE for constants, kebab-case for CSS and URLs.