Case converter
Convert text between different cases (camelCase, snake_case, etc.)
Input Text
Enter the text you want to convert
camelCase
PascalCase
snake_case
kebab-case
CONSTANT_CASE
dot.case
path/case
Sentence case
Title Case
lowercase
UPPERCASE
TL;DR
What is Case converter?
Case conversion transforms text between naming conventions used in different programming contexts. Each convention has a specific pattern for separating words: camelCase joins words with capital letters, snake_case uses underscores, kebab-case uses hyphens, and PascalCase capitalizes every word.
Common use cases
- ‣Code refactoring: rename variables, functions, or database columns from one convention to another in bulk
- ‣API integration: convert JSON field names between snake_case (common in Python/Ruby) and camelCase (common in JavaScript)
- ‣Database migration: translate camelCase column names from ORM models to snake_case for SQL databases
- ‣CSS class names: convert a component name to kebab-case for use as a CSS class or HTML attribute
Frequently asked questions
What is the difference between camelCase and PascalCase?
camelCase (lower camel case) starts with a lowercase letter: myVariableName. PascalCase (upper camel case) starts with an uppercase letter: MyVariableName. PascalCase is conventional for class names and React components; camelCase is conventional for variable and function names in JavaScript.
When should I use snake_case versus kebab-case?
snake_case is conventional for variable and function names in Python, Ruby, and SQL. kebab-case is conventional for CSS class names, HTML attributes, URL slugs, and file names (where hyphens are more readable than underscores). JavaScript identifiers cannot use hyphens, so snake_case or camelCase is used there instead.