What Is PascalCase? Examples and Rules

A clear guide to PascalCase for classes, components, and types—with mistakes to avoid.

Definition

PascalCase joins words without spaces and capitalizes the first letter of each word: `UserProfile`, `OrderLineItem`, `HttpClientFactory`. It is also called UpperCamelCase.

Where teams use it

C# class names, Java public types, React component files, TypeScript interfaces, and Swift types commonly use PascalCase. API resource names in .NET ecosystems often appear in PascalCase in docs even when JSON properties use camelCase.

PascalCase vs camelCase

camelCase starts lowercase (`userProfile`). Use camelCase for variables and functions in JavaScript; PascalCase for React components and ES6 classes. Mixing them in one file is normal—consistency within each category matters.

Common mistakes

Acronyms trip people up: prefer `HttpRequest` or `HTTPRequest` per team style, but do not switch mid-repo. Avoid PascalCase for database snake_case columns unless your ORM maps names automatically.

Frequently asked questions

Is PascalCase the same as UpperCamelCase?

Yes. Both terms describe the same capitalization pattern.

Should file names match class names?

In many frameworks yes (`UserCard.tsx` exports `UserCard`). Follow your framework’s generator and linter defaults.

Explore Case Modify

Case Modify publishes free browser-based text converters, code formatters, encoders, random generators, and unit calculators. Each page runs locally after load unless a tool page states otherwise.

  • Case convertersTitle case, sentence case, uppercase, lowercase, camelCase, PascalCase, snake_case, and kebab-case tools.
  • Code & DataJSON, HTML, CSS, JavaScript, XML, YAML, Markdown, GraphQL, TypeScript, and SCSS formatters.
  • JSON toolsFormat, minify, escape, stringify, and edit JSON in the browser.
  • Text toolsFind and replace, duplicate line removal, sorting, encoding, and cleanup utilities.
  • ConvertersLength, weight, temperature, time, volume, area, energy, and related conversion calculators.
  • Font stylesBold, italic, bubble, aesthetic, and platform-specific Unicode text generators.
  • Random generatorsRandom numbers, letters, passwords, UUIDs, dates, and related generators.
  • BlogGuides on title case, camelCase, JSON formatting, and developer naming conventions.

Machine-readable summaries: llms.txt, llms-full.txt, agents.txt.