Case Converter

Convert text between camelCase, snake_case, kebab-case, and more.

Text
Input text

Why case conventions matter in programming

Different programming languages, frameworks, and contexts have different conventions for naming variables, functions, files, and database columns. Using the wrong case convention is not just a style issue — in some contexts it causes actual bugs or prevents code from working at all.

camelCase (myVariableName) is the standard for variables and functions in JavaScript, Java, Swift, and Kotlin. The first word is lowercase, subsequent words are capitalized. PascalCase (MyClassName) is the same but with the first word also capitalized — it is the convention for class names and React components. snake_case (my_variable_name) is standard in Python, Ruby, and PostgreSQL column names. kebab-case (my-variable-name) is used in CSS class names, HTML attributes, URL slugs, and JSON keys in some APIs. SCREAMING_SNAKE_CASE (MY_CONSTANT) is used for constants in many languages.

This converter handles all these cases and also detects the input format automatically, so you can start with any style and convert to all others simultaneously.

Common mistakes

  • Acronyms in camelCase — Style guides differ on how to handle acronyms: parseHTML vs parseHtml. Pick one convention and stick to it within a codebase.
  • Numbers — Numbers in identifiers are handled differently by tools: my2ndVariable vs my_2nd_variable. Avoid leading numbers in identifiers.