/ˈpæskəl keɪs/

noun — “the naming style where every word stands tall like soldiers in formation.”

PascalCase is a naming convention in programming where each word in an identifier begins with an uppercase letter and there are no spaces or separators between words. This style is often used for class names, constructor functions, namespaces, and sometimes constants, depending on language-specific conventions. It’s closely related to camelCase, but the first word is capitalized, giving identifiers a distinctive, formal look.

In practical use, PascalCase helps distinguish types, objects, or classes from variables or functions that might use camelCase. For example, in languages like C#, Visual Basic, and Java, PascalCase is the de facto standard for class names, providing an immediate visual cue about the role and scope of an identifier.

PascalCase also interacts with concepts like Variable Naming, Naming Convention, and Code Quality. Consistent use improves readability, reduces errors during Code Review, and ensures that developers can quickly distinguish types, constructors, and modules from standard variables or methods.

In practice, PascalCase identifiers make code visually organized and easy to scan. A few examples illustrate typical usage:

// Class names in C#
public class UserProfile {
    public string UserName { get; set; }
    public int AccountId { get; set; }
}

// Constructor functions in JavaScript
class ShoppingCart {
    constructor(items) {
        this.Items = items;
    }
}

// Namespaces and modules
namespace DataProcessing {
    class DataValidator { /* ... */ }
}

// PascalCase combined with camelCase
let cart = new ShoppingCart(items); // variable is camelCase, class is PascalCase

Key considerations when using PascalCase include consistency within a project, understanding language conventions, and clearly differentiating classes or types from variables. Mixing styles arbitrarily can reduce readability, so many teams enforce PascalCase for classes while reserving camelCase or snake_case for variables and functions.

PascalCase is like writing a title where every word starts with a capital: formal, clear, and impossible to miss.

See camelCase, snake_case, kebab-case, Naming Convention, Variable Naming.