Skip to content
Case Converter Online
en

Pascal Case Converter

Convert words, snake_case or camelCase into PascalCase. Use it for class names, React components and types.

Characters
0
Words
0
Sentences
0
Lines
0

Convert to

For code

Runs in your browser. Your text is never uploaded.

What PascalCase is

PascalCase removes the spaces between words and gives every word a capital first letter:

  • user profile card becomes UserProfileCard
  • order_line_item becomes OrderLineItem
  • httpClient becomes HttpClient

It differs from camelCase in one way only: the first letter is a capital too.

How the converter works

For each line, the tool finds the words, capitalizes the first letter of each, lowercases the rest and joins them. It understands words separated by spaces, underscores, hyphens and dots, and it splits existing camelCase names at their capital letters. Apostrophes and punctuation are removed.

Input Output
user profile card UserProfileCard
order_line_item OrderLineItem
nav-bar-item NavBarItem
getUserById GetUserById
payment gateway response PaymentGatewayResponse

Where PascalCase is used

  • Class names in Java, C#, Python, TypeScript, Swift, Kotlin and most other object-oriented languages
  • React, Vue and Svelte components: UserCard, NavBar
  • TypeScript types and interfaces: UserProfile, ApiResponse
  • C#: method and property names as well as classes
  • Go: exported functions and types, which must start with a capital to be visible outside their package
  • Enum names in many languages

A useful rule of thumb in most languages: things you create instances of (classes, types, components) use PascalCase, and the instances themselves use camelCase or snake_case. So a UserProfile class produces a userProfile variable.

Typical conversions

Database tables to model classes. A table called order_line_items usually maps to a class called OrderLineItem. Paste your table names and convert the list, then drop the plural where needed.

File names to component names. A file called user-card.jsx usually exports a component called UserCard.

Plain descriptions to type names. Type “api error response” and get ApiErrorResponse.

Naming tips

  • Use nouns for classes and types: Invoice, not ProcessInvoice.
  • Avoid abbreviations that only you understand. CustomerAddress is clearer than CustAddr.
  • Pick one acronym rule (HttpClient or HTTPClient) and keep to it across the project.

Pascal Case Converter: questions and answers

What is Pascal case?

Pascal case joins words with no spaces and starts every word with a capital letter, including the first, as in UserProfile or OrderLineItem. It is named after the Pascal programming language, where the style was common. It is also called upper camel case.

What is the difference between PascalCase and camelCase?

PascalCase capitalizes the first letter (UserName). camelCase leaves it lowercase (userName). Everything else is the same.

Why do React components use PascalCase?

React treats a tag that starts with a lowercase letter as a built-in HTML element such as div or span. A capital first letter tells React the tag is your own component, so component names must be capitalized.

How are acronyms handled?

Each word gets one capital followed by lowercase letters. 'http client' becomes HttpClient and 'XML parser' becomes XmlParser. If your code base keeps acronyms in capitals, edit those names after converting.

More code and data tools

See all tools