Case Converter
Convert text between uppercase, lowercase, title case, camelCase, snake_case, kebab-case, PascalCase, and more — instantly in your browser.
Input
Output — Title Case
Converted text will appear here…FAQ
Which case should I use for JavaScript variable names?▼
Use camelCase for variables and functions, PascalCase for classes and React components.
Does snake_case remove spaces?▼
Yes. Spaces are replaced by underscores, special characters are removed, and the result is lowercased.
Does alternating case work on numbers?▼
Numbers and punctuation are left unchanged. Only alphabetic characters alternate.
Frequently Asked Questions
What is camelCase?
camelCase writes compound words with no spaces. The first word is lowercase and each subsequent word starts with a capital letter. Example: myVariableName. Used in JavaScript, Java, and Swift.
What is the difference between snake_case and kebab-case?
snake_case uses underscores (my_variable) while kebab-case uses hyphens (my-variable). kebab-case is common in URLs and CSS; snake_case is common in Python, databases, and file names.
What is PascalCase?
PascalCase (also called UpperCamelCase) capitalizes the first letter of every word with no separators: MyClassName. Used for class names in most OOP languages.
Naming Convention Reference
| Convention | Example | Used in |
|---|---|---|
| camelCase | myVariableName | JavaScript / TypeScript variables & functions |
| PascalCase | MyClassName | Classes in JS, TS, C#, Java; React components |
| snake_case | my_variable_name | Python variables, Ruby, database column names |
| CONSTANT_CASE | MAX_RETRY_COUNT | Constants in most languages |
| kebab-case | my-component-name | HTML attributes, CSS classes, URLs, file names |
| UPPER CASE | MY VARIABLE NAME | Emphasis, acronyms, headings |
| lower case | my variable name | Normalized text for comparison |
| Title Case | My Variable Name | Page titles, headings, proper nouns |
| Sentence case | My variable name | Body copy, sentences |
Why Naming Consistency Matters
Inconsistent naming conventions are a common source of bugs and friction in team projects. For example, a JSON API returninguser_name(snake_case) consumed by a JavaScript frontend expectinguserName(camelCase) requires explicit mapping at every boundary — a common cause of undefined errors.
Most languages have an official style guide that specifies the convention: PEP 8 for Python, Google Java Style, Airbnb JavaScript Style, Go's gofmt, and Rust's rustfmt. Following these conventions ensures code is readable to any developer familiar with the ecosystem, reduces cognitive load during code review, and is enforced automatically by linters and formatters.
Practical Conversion Examples
- Database column
first_name→ JS propertyfirstName(snake_case → camelCase) - Blog title
How to Use React Hooks→ URL slughow-to-use-react-hooks(Title Case → kebab-case) - CSS class
btn-primary→ React propbtnPrimary(kebab-case → camelCase) - Environment variable
DATABASE_URL→ TypeScript constantdatabaseUrl(CONSTANT_CASE → camelCase)