PascalCase Converter — Convert Text to PascalCase Online
What is PascalCase?
PascalCase (also known as UpperCamelCase or StudlyCase) is a naming convention where every word in the identifier is capitalized, including the first. Words are joined with no spaces or separators — capitalisation alone marks the boundary between words. "Pascal" refers to the Pascal programming language, which popularized this convention in the 1970s.
PascalCase is the standard convention for class names, type names, and interfaces across most programming languages. In object-oriented languages like Java, C#, Python, and TypeScript, class names are PascalCase by convention. React components are specifically required to be PascalCase (lowercase components are treated as HTML elements, not React components).
The visual distinction between PascalCase and camelCase is purely the first letter: PascalCase always starts with a capital, camelCase starts lowercase.
Example
| Input | Output (PascalCase) |
|---|---|
| hello world component | HelloWorldComponent |
How to Convert to PascalCase
- Enter your text — words separated by spaces.
- Click the PascalCase button.
- Copy the output into your code.
Every word will have its first letter capitalized and spaces will be removed, producing a valid PascalCase identifier ready for use in any language.
When to Use PascalCase
Use PascalCase for class names, interface names, type aliases, enum names, and React component names. If you're creating a new class, type, or component and can't remember which case to use, PascalCase is almost always the right choice for named types across all major languages.
In React specifically, components must begin with a capital letter (PascalCase) or React will treat them as built-in HTML tags. This is a hard technical requirement, not just a style convention.
Common Use Cases for PascalCase
- React component names (required by React)
- Class names in JavaScript, TypeScript, Java, C#, Python
- TypeScript interface and type alias names
- Enum names and enum member names
- Constructor function names in JavaScript
- C# namespace and assembly names
Frequently Asked Questions
What is PascalCase?
PascalCase capitalizes the first letter of every word, with no spaces or separators. Example: "my component name" becomes "MyComponentName". Used for class names, type names, and React components.
Why must React components be in PascalCase?
React uses the capitalisation of a component name to distinguish it from a built-in HTML element. A lowercase component like <button> is an HTML element. An uppercase component like <Button> is a React component. This is a hard rule in JSX parsing.
What is the difference between PascalCase and camelCase?
PascalCase capitalizes the first letter: "MyVariable". camelCase keeps the first letter lowercase: "myVariable". PascalCase is for types and classes; camelCase is for variables and functions.
Is PascalCase the same as UpperCamelCase?
Yes. PascalCase and UpperCamelCase are different names for the same convention. Both mean that every word starts with a capital letter.