PascalCase Converter
Converts phrases or identifiers into PascalCase, where every word starts with a capital letter and there are no spaces. Use it to name classes, components and types in code, with one result for each line you enter.
How to use the PascalCase Converter
- Enter one phrase or identifier per line. Each line becomes one PascalCase identifier.
- Copy the result into your code.
Rules applied
- Words are split at spaces, punctuation, underscores, hyphens and camelCase or acronym boundaries.
- Every word starts with a capital letter; the rest is lowercase (HTML parser becomes HtmlParser).
- Apostrophes are removed and empty lines are kept.
Limitations
- Accented and non-Latin letters are kept; use Remove Accents first if your language requires ASCII identifiers.
Worked examples
Input
user profile card order-line-item HTML parser
Result
UserProfileCard OrderLineItem HtmlParser
Input
parse_xml_file myURLHandler get-user's name
Result
ParseXmlFile MyUrlHandler GetUsersName
Practical uses
-
Naming classes from a spec
A developer has plain-English names in a design document. They paste them one per line and convert them to PascalCase. The results can be copied straight into the code as class names.
-
Converting file names to components
A front-end developer has hyphenated file names that need to become component names. They paste them one per line. Each becomes a PascalCase identifier, so a name such as user-profile-card turns into UserProfileCard.
-
Standardising a list of types
A team lead has a mixed list of names in different styles. They paste the list and convert it in one go. Every line then follows the same format, which makes a code review easier.
Related tools
Privacy: this tool runs entirely in your browser. Your text is not uploaded, logged or saved, and it is never sent to analytics. Maximum input: 1 MiB.