Writing
Code
Other
Clean up
Shortcuts: Ctrl/Cmd + Enter copies the result, Ctrl/Cmd + Z undoes the last clean-up.
What PascalCase is
PascalCase joins words with no spaces and starts each word with a capital letter, including the first. user first name becomes UserFirstName. It is also called UpperCamelCase. The only difference from camelCase is the first letter: camelCase starts lowercase, PascalCase starts with a capital.
How to use the converter
Type or paste a phrase into the box above. PascalCase is already selected, so the result appears underneath. Copy it into your code. Several lines convert together, one name per line.
What it does to different input
| You type | PascalCase result |
|---|---|
user first name | UserFirstName |
hello_world-foo.bar | HelloWorldFooBar |
get_http_response | GetHttpResponse |
my-react-component | MyReactComponent |
order #42 shipped | Order42Shipped |
Where PascalCase is used
- Classes and types in Java, C#, Swift, Kotlin, TypeScript and many other languages, such as
CustomerAccount. - React components. A component name must start with a capital letter, so
UserCardis treated as a component whileuserCardis treated as an ordinary HTML tag. - C# members. Public methods and properties conventionally use PascalCase.
- Python classes. PEP 8 asks for class names in this style, which it calls CapWords, while functions and variables use snake_case.
Check these before you paste into code
- Acronyms. The converter writes
HttpResponse, notHTTPResponse. Some style guides prefer one and some the other, so edit it to match your team. - Names cannot start with a digit.
42 answersbecomes42Answers, which most languages reject. - Reserved words are not checked. A phrase that becomes a keyword in your language needs a different name.
All converters: Uppercase to Lowercase · Lowercase to Uppercase · ALL CAPS Converter · ALL CAPS to Sentence Case · Capitalize Text · Title Case · Sentence Case · Toggle Case · Alternating Case · camelCase · snake_case · kebab-case · CONSTANT_CASE & dot.case
- What is PascalCase?
- A naming style where each word starts with a capital letter and there are no spaces, such as UserFirstName.
- What is the difference between PascalCase and camelCase?
- PascalCase starts with a capital letter (UserFirstName). camelCase starts with a lowercase letter (userFirstName).
- Which languages use PascalCase?
- It is the usual style for class and type names in Java, C#, Swift, Kotlin and TypeScript, for React components, and for public members in C#.
- Can it convert snake_case or kebab-case to PascalCase?
- Yes. Underscores, hyphens, dots and spaces are word breaks, so my-react-component becomes MyReactComponent.
- Does it work on several lines?
- Yes. Each line becomes its own name.