getwordcount.com

PascalCase Converter

Convert text to PascalCase for class names.

Copied to clipboard

This PascalCase converter removes spaces and capitalises the first letter of every word, including the first — turning user profile into UserProfile. It is the convention for class names, React components and type names.

How to use the PascalCase converter

  1. Paste a phrase or an identifier in any case.
  2. The PascalCase (UpperCamelCase) version appears instantly.
  3. Copy it into your code.

When to use PascalCase

PascalCase — also called UpperCamelCase — is standard for classes, interfaces, enums and React components: UserProfile, InvoiceLineItem, HttpClient. The rule of thumb across many languages is PascalCase for types and camelCase for the variables and functions that use them.

PascalCase next to the other styles

All the programming cases carry the same words and differ only in separators and capitals: user profile becomes UserProfile in PascalCase, userProfile in camelCase, user_profile in snake_case and user-profile in kebab-case. Codebases mix them deliberately — PascalCase for the class, camelCase for the instance that holds it, snake_case for the database table it maps to — so converting the same name between styles is routine work. The camelCase and snake_case converters produce their versions from exactly the same input.

Examples

InputPascalCase
user profileUserProfile
invoice_line_itemInvoiceLineItem
http-clientHttpClient

Frequently asked questions

Is PascalCase the same as camelCase?

Almost — PascalCase capitalises the first word too. UserProfile is PascalCase; userProfile is camelCase.

What is the difference between PascalCase and UpperCamelCase?

They are two names for exactly the same style: every word capitalised with no separators.

Where is PascalCase used?

For class, interface, enum and type names in C#, Java, TypeScript and Swift, and for component names in React and Vue.

Does it accept snake_case and kebab-case input?

Yes. Spaces, underscores and hyphens are all treated as word boundaries, so invoice_line_item and http-client both convert cleanly.

Should file names be PascalCase?

Only where convention says so. React component files are often PascalCase to match the component they export; most other web files stick to kebab-case or snake_case.

Related tools