PascalCase, sometimes called UpperCamelCase, is the conventional way to name classes, types, and components. This converter rewrites any phrase or differently-cased identifier into PascalCase, removing separators and capitalising every word, including the first.
How it works
The input is split into a list of lowercase word tokens, then each token is capitalised and the tokens are concatenated with no separator:
"user profile id" -> UserProfileId
"user_profile_id" -> UserProfileId
"userProfileId" -> UserProfileId
"open-api-spec" -> OpenApiSpec
Word boundaries come from separators (spaces, underscores, hyphens, dots) as well as case transitions inside existing camelCase or PascalCase input, so the result is stable no matter how the source was formatted.
Tips and notes
Because acronyms are folded to a single capital, parseJSON becomes
ParseJson. Restore the exact casing you need after copying if your codebase
keeps acronyms uppercase. Letters and digits are also separated during
tokenisation, which keeps the output predictable; rejoin a version segment
manually if you prefer it glued to the preceding word.
When to use PascalCase
PascalCase is the industry default for a specific, consistent set of identifiers across most modern languages:
| Context | Examples |
|---|---|
| Classes (all languages) | UserAccount, PaymentService |
| TypeScript interfaces | ApiResponse, UserProfile |
| React/Vue/Svelte components | NavBar, DropdownMenu |
| Enum types (TypeScript, C#, Java) | OrderStatus, PaymentMethod |
| C# properties and methods | GetUserById(), TotalAmount |
Where PascalCase is wrong. Variables, function arguments, and object properties in JavaScript/TypeScript use camelCase (userId, not UserId). File names in most web projects use kebab-case (user-profile.tsx, not UserProfile.tsx). Constants in many codebases use SCREAMING_SNAKE_CASE (MAX_RETRIES). Using the wrong case convention in a codebase causes lint errors, breaks import resolution on case-sensitive Linux filesystems, and signals unfamiliarity with the project’s style guide.
Handling tricky inputs
Multiple consecutive separators. user--profile and user__profile both produce UserProfile — repeated separators are collapsed.
Mixed input. If your source contains both snake_case and camelCase in the same string (for example, user_profileId), the converter handles both types of boundary simultaneously: result is UserProfileId.
Numbers. Digit runs are treated as their own token, so mp4Player becomes Mp4Player. If you need MP4Player, paste the result and adjust manually.
Language-specific casing policies (Go, Rust). In Go, PascalCase controls exported identifiers — Handler is public, handler is private. In Rust, PascalCase is mandatory for struct, enum, and trait names and will produce a compiler warning if ignored. This converter produces the right form for both without extra configuration.