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

✓ Copied!
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

ConventionExampleUsed in
camelCasemyVariableNameJavaScript / TypeScript variables & functions
PascalCaseMyClassNameClasses in JS, TS, C#, Java; React components
snake_casemy_variable_namePython variables, Ruby, database column names
CONSTANT_CASEMAX_RETRY_COUNTConstants in most languages
kebab-casemy-component-nameHTML attributes, CSS classes, URLs, file names
UPPER CASEMY VARIABLE NAMEEmphasis, acronyms, headings
lower casemy variable nameNormalized text for comparison
Title CaseMy Variable NamePage titles, headings, proper nouns
Sentence caseMy variable nameBody 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 property firstName (snake_case → camelCase)
  • Blog title How to Use React Hooks → URL slug how-to-use-react-hooks (Title Case → kebab-case)
  • CSS class btn-primary → React prop btnPrimary (kebab-case → camelCase)
  • Environment variable DATABASE_URL → TypeScript constant databaseUrl (CONSTANT_CASE → camelCase)