Programming Naming Conventions: camelCase, snake_case, and PascalCase

How camelCase, snake_case, and PascalCase each format the same phrase differently, and which programming contexts use which convention.

The same variable name can be written three completely different ways depending on the language and team convention in use.

camelCase: lowercase start, capitalized words after

"hello world example" becomes "helloWorldExample" — the first word stays lowercase, and every subsequent word gets capitalized, with no separators. JavaScript, TypeScript, and Java commonly use camelCase for variable and function names.

snake_case: all lowercase, joined by underscores

The same phrase becomes "hello_world_example" — every word lowercased and joined with underscores instead of capitalization. Python and Ruby commonly use snake_case for variables and functions, and it's also the standard convention for SQL database column names.

PascalCase: every word capitalized, including the first

"hello world example" becomes "HelloWorldExample" — the only difference from camelCase is that the very first letter is also capitalized. PascalCase is the standard convention for naming classes, types, and React/TypeScript components.

Why the convention matters

Using the wrong naming convention for a given language doesn't break the code, but it immediately signals unfamiliarity with that ecosystem's norms — consistent casing is one of the simplest ways code readability is judged. Try the camelCase converter, snake_case converter, and PascalCase converter to quickly reformat a name for whichever convention your project uses.