TL;DR
- → camelCase for JS/TS variables and functions. PascalCase for classes and React components.
- → snake_case for Python, Ruby, SQL. kebab-case for URLs, CSS, HTML attributes.
- → Convert between all cases instantly with the free Case Converter.
Advertisement Space
Naming convention is one of those things that feels trivial until you're debugging a production issue at 2am because a Python function used camelCase and the downstream JSON parser expected snake_case. The rules aren't arbitrary — they are ecosystem conventions that determine how your code integrates with frameworks, linters, and other people's code.
The 5 Naming Conventions Explained
camelCasePascalCasesnake_casekebab-caseSCREAMING_SNAKE_CASEQuick Reference by Language
| Language | Variables/Functions | Classes | Constants |
|---|---|---|---|
| JavaScript / TypeScript | camelCase | PascalCase | SCREAMING_SNAKE |
| Python | snake_case | PascalCase | SCREAMING_SNAKE |
| Go | camelCase | PascalCase | PascalCase or camelCase |
| Ruby | snake_case | PascalCase | SCREAMING_SNAKE |
| Java / Kotlin | camelCase | PascalCase | SCREAMING_SNAKE |
| SQL | snake_case | PascalCase | SCREAMING_SNAKE |
| CSS | kebab-case | N/A | N/A |
| URLs / Slugs | kebab-case | N/A | N/A |
Advertisement Space
Convert between cases in one click
The free Case Converter handles camelCase, PascalCase, snake_case, kebab-case, UPPER_CASE and more. Paste your text and get every format instantly.
Open Case Converter Free →Frequently Asked Questions
Why does naming convention matter in programming?
Naming conventions matter for three reasons: readability (consistent style makes code scannable), tooling (linters, bundlers, and frameworks often rely on conventions to auto-discover files), and collaboration (teams work faster when everyone follows the same rules). Inconsistent naming in a large codebase is a real source of bugs — especially in case-sensitive languages and file systems.
Is JavaScript camelCase or PascalCase?
Both — context-dependent. Variables and functions use camelCase (getUserById). Classes and React components use PascalCase (UserCard). Constants use SCREAMING_SNAKE_CASE (MAX_RETRIES). CSS class names used in JS/TS typically use camelCase when referenced via styles objects, but kebab-case in CSS files.
Does Python use snake_case or camelCase?
Python's official style guide (PEP 8) specifies snake_case for variables, functions, and module names. PascalCase is used for class names. SCREAMING_SNAKE_CASE for module-level constants. Unlike JavaScript, camelCase in Python functions is considered non-idiomatic and is discouraged in code reviews.
What is kebab-case used for?
Kebab-case (words-separated-by-hyphens) is used primarily in HTML attributes, CSS class names, URL slugs, and CLI flags. It is not valid in most programming language identifiers (because the hyphen is interpreted as a minus operator) but is the standard in web contexts: class='user-card', /tools/case-converter, --dry-run.
How do I convert between cases quickly?
The ToolStack Case Converter handles all conversions instantly — paste your text and it converts to camelCase, PascalCase, snake_case, kebab-case, UPPER_CASE and more in one click. No signup, runs in your browser.
