Pascal Case Converter

Convert text to PascalCase.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Paste a phrase and press Run to get PascalCase, where every word starts with a capital and there are no separators. It suits class names, types and React components.

How to use

1
Step 1
Paste the phrase or identifier into Input.
2
Step 2
Press Run.
3
Step 3
Copy the PascalCase name.

How it works

Input is split into runs of A to Z letters and digits. Each run is capitalised on its first letter and lowercased after that, then all runs are joined. Any other character acts as a separator and disappears.

Worked example

A component name

Input
user first-name_field
Output
UserFirstNameField
Walkthrough
Three words are found, each is capitalised, and the separators are removed.

Limitations

  • Acronyms are flattened: API key becomes ApiKey.
  • Non-ASCII letters are dropped as separators.
  • Existing camelCase is not split into words.

Questions

What is the difference between PascalCase and camelCase?
PascalCase capitalises the first word too: UserName versus userName.
Will it keep acronyms like API?
No. Every word is capitalised then lowercased, so API becomes Api.
Can I convert kebab-case to PascalCase?
Yes. Hyphens are separators, so my-component becomes MyComponent.

Features

  • UpperCamelCase output
  • Handles mixed separators
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Learn Regular Expressions - Crash Course

    freeCodeCamp.org

    Regex powers many find/replace and clean-text workflows.

    Watch on YouTube
  • CSS Flexbox Crash Course

    freeCodeCamp.org

    Case and spacing tools show up constantly in front-end copy.

    Watch on YouTube