What is PascalCase?
PascalCase joins words with no separators and capitalizes the first letter of every word, including the first one. It is also known as UpperCamelCase and takes its name from the naming conventions popularized by the Pascal programming language.
PascalCase examples
- hello world example → HelloWorldExample
- user profile card → UserProfileCard
- http request handler → HttpRequestHandler
Where is PascalCase used?
PascalCase is the convention for classes, constructors and types: React components (UserProfileCard), TypeScript interfaces and type aliases, Java and C# class names, and .NET method names. The leading capital signals "this is a type or component", which keeps it visually distinct from camelCase variables and functions.
PascalCase vs camelCase
The two styles are identical except for the first letter: camelCase starts lowercase (userName), PascalCase starts uppercase (UserName). Many teams mix them deliberately — PascalCase for types and components, camelCase for everything else.