Every language has a naming convention, and for once it's not personal preference — it's enforced by tooling, reviewed by teammates, and baked into the standard library. Here's the cheat sheet.
The big ones
- Python — snake_case for variables and functions, PascalCase for classes, SCREAMING_SNAKE_CASE for constants.
- JavaScript / TypeScript — camelCase for variables and functions, PascalCase for classes and React components, SCREAMING_SNAKE_CASE for constants.
- Java — camelCase for methods and variables, PascalCase for classes, SCREAMING_SNAKE_CASE for constants.
- Go — PascalCase for exported identifiers, camelCase for package-private. Case is syntactically meaningful — uppercase = public.
- Rust — snake_case for variables and functions, PascalCase for types and traits, SCREAMING_SNAKE_CASE for constants.
- Ruby — snake_case for variables and methods, PascalCase for classes and modules, SCREAMING_SNAKE_CASE for constants.
- C / C++ — historically all-over-the-place. Modern convention: snake_case for variables, PascalCase for types, SCREAMING_SNAKE_CASE for macros.
The markup / data formats
- HTML attributes — kebab-case (
data-user-id,aria-label). - CSS classes + custom properties — kebab-case (
.main-nav,--brand-color). - JSON — no official convention; follows the consuming language. APIs in the JS ecosystem use camelCase; in Python, snake_case.
- YAML — usually snake_case, occasionally kebab-case.
- XML element names — often PascalCase, sometimes kebab-case.
Databases + SQL
- SQL keywords — SCREAMING_SNAKE_CASE by convention (SELECT, FROM, WHERE).
- Table + column names — snake_case (
user_accounts.first_name). Quoted identifiers can be anything, but snake_case is dominant. - PostgreSQL — enforces lowercase-only by default unless you quote identifiers.
Environment vars + CLI
- Env vars — SCREAMING_SNAKE_CASE universally (
DATABASE_URL). - CLI flags — kebab-case for long options (
--dry-run,--output-format). - File names — kebab-case on the web (SEO-friendly URLs), snake_case in Python/Ruby projects, PascalCase for .NET.
// TRY THE TOOL
CONVERT A NAME.
13 case formats, live conversion. The fast path between camelCase, snake_case, kebab-case, and the rest.
OPEN →

