use case

How to convert identifiers to PascalCase for class names

Convert snake_case or camelCase identifiers to PascalCase for React components and class names.

PascalCase (also called UpperCamelCase) is the standard for class names in Java, C#, and TypeScript, React component names, and Python class names. When generating code, scaffolding components from a CLI, or adapting names from a database schema to a type definition, you need to convert identifiers to PascalCase reliably. This guide shows how to do it in one step from any source format.

Step-by-step guide

  1. Paste the source name: Enter the name in any format — snake_case ('user_profile'), camelCase ('userProfile'), or a plain phrase ('user profile').
  2. Select PascalCase: Choose 'PascalCase'. Every word's first letter is capitalised and the rest is lowercase; no separators.
  3. Use as a class or component name: Copy the result for use as a React component name (UserProfile), a TypeScript interface name, a Python class, or a Java/C# class. The tokens field confirms the words that were detected.

Frequently asked questions

Is PascalCase the same as UpperCamelCase?
Yes. PascalCase and UpperCamelCase are synonyms. Both refer to the convention where every word starts with an uppercase letter (UserProfile, HttpRequest). The name 'PascalCase' comes from the Pascal programming language, which popularised the style.
Should React component file names use PascalCase or kebab-case?
React component names (the JSX tag) must be PascalCase — React uses capitalisation to distinguish components from native HTML elements. File names are a project convention: many teams use PascalCase (UserProfile.tsx) for component files, but kebab-case (user-profile.tsx) is also common. Check your project's ESLint or StyleGuide config.

Try it now

Use the Text Case Converter to complete this task — free, no sign-up, runs in your browser.

Open Text Case Converter

We use cookies to serve ads and measure traffic. Cookie policy · Privacy policy