Turn phrases, snake_case or kebab-case into camelCase or PascalCase for variable, function and class names. Paste a list and each line converts on its own.
Examples
user first name get_user_by_id background-color
userFirstName getUserById backgroundColor
shopping cart item XMLHttpRequest handler
ShoppingCartItem XmlHttpRequestHandler
a beginner's guide
aBeginnersGuide
camelCase vs. PascalCase
| camelCase | PascalCase | |
|---|---|---|
| First word | lowercase: userName | Capital: UserName |
| Typical use | Variables, functions, JSON keys | Classes, types, React components |
| Languages | JavaScript, Java, Swift, Kotlin | C#, TypeScript types, Pascal |
How words are split
- Spaces, underscores, hyphens, dots and other punctuation separate words:
user_first-name→userFirstName. - Existing capitals start a new word, so you can convert between styles:
XMLHttpRequest→xmlHttpRequest. - Apostrophes are removed instead of splitting the word:
beginner's guide→beginnersGuide. - Every line converts separately, so a pasted list stays a list.
- Accented letters are kept (
açãostaysação). Remove them yourself if your language or tool needs plain ASCII names.
Frequently asked questions
What is camelCase?
A way of writing phrases without spaces where each word after the first starts with a capital letter, like firstName. The capitals look like the humps of a camel.
How do I convert snake_case to camelCase?
Paste the snake_case names above with camelCase selected. Underscores are treated as word breaks, so user_id becomes userId.
Is camelCase the same as PascalCase?
Almost. PascalCase also capitalizes the first word (FirstName); camelCase starts lowercase (firstName).