String Case Converter — camelCase, snake_case, kebab-case & More
Convert identifiers between 8 common case formats used in programming: camelCase for JavaScript, snake_case for Python, kebab-case for CSS, PascalCase for classes, and more. Conversion is instant as you type.
What is string case conversion?
Different programming languages and contexts use different naming conventions. camelCase uses lowercase first word with uppercase subsequent words. snake_case separates words with underscores. kebab-case uses hyphens. PascalCase capitalizes every word.
Why Use This Tool
- Code migration — Convert identifiers between Python (snake_case) and JavaScript (camelCase).
- API integration — Match external API naming conventions with your codebase.
- Database mapping — Convert DB columns (snake_case) to code properties (camelCase).
- CSS classes — Generate kebab-case class names from component names.
- Environment variables — Convert names to CONSTANT_CASE for env vars.
Tips
- Be consistent within a codebase.
- camelCase is standard in JavaScript and TypeScript.
- Python follows snake_case for most identifiers.
- CSS classes typically use kebab-case.
- Acronyms are treated as single words.
How to Use the String Case Converter
Enter text
Type or paste any identifier — camelCase, snake_case, or plain words.
Select target case
Click one of the 8 case format buttons.
View conversion
The converted text appears instantly.
Copy result
Click Copy to copy the converted string.
Worked Examples
To camelCase
user_first_name
userFirstName
To snake_case
getUserById
get_user_by_id
To kebab-case
MyComponent
my-component
To PascalCase
user-profile-card
UserProfileCard
To CONSTANT_CASE
apiBaseUrl
API_BASE_URL
Case Format Usage
| Feature | Format | Common Use |
|---|---|---|
| camelCase | myVariable | JS/TS variables, functions |
| PascalCase | MyClass | Classes, React components |
| snake_case | my_variable | Python, Ruby, databases |
| kebab-case | my-class | CSS, HTML, URL slugs |
| CONSTANT_CASE | MY_CONST | Constants, env vars |
Frequently Asked Questions
Does it handle mixed input?
Yes — input can be camelCase, snake_case, kebab-case, or plain words with spaces. The converter extracts words and reformats them in your chosen style.
What about acronyms?
Acronyms like XMLParser are treated as words. Conversion may split them: xml_parser in snake_case. Handle acronyms manually if your style guide requires XMLParser → xmlParser.
Which case for CSS?
BEM methodology uses kebab-case for blocks and elements: nav-bar__item--active. Tailwind uses kebab-case utility classes.
Which case for Python?
PEP 8 recommends snake_case for functions and variables, PascalCase for classes, and CONSTANT_CASE for module-level constants.