Skip to main content

Case Converter

Convert text to camelCase, snake_case, kebab-case, PascalCase, CONSTANT_CASE, Title Case, UPPERCASE or lowercase in one click, right in your browser.

Input text

Stays in your browser

Converted

Type or paste text to see every naming style at once.

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Next steps

Done here? Use the Send to… menu on the result to carry it on to Slug Generator or Word & Character Counter.

Free Online Case Converter

Type or paste any text to instantly see it converted into every common naming convention at once — camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, UPPERCASE, lowercase, and Title Case — each with its own copy button. It helps frontend and API developers normalize variable names, database fields, labels, and URL-friendly identifiers.

Why naming conventions matter

Different languages, frameworks, and style guides expect different naming conventions: JavaScript variables are conventionally camelCase, Python variables and database columns are typically snake_case, CSS classes and URL slugs use kebab-case, and class names across most languages use PascalCase. Manually retyping a name in a different convention is tedious and error-prone — this tool converts a name (or a whole block of text) into every common style at once.

How the conversion works

The tool first breaks your input into individual words, splitting on existing separators (spaces, hyphens, underscores) and on lowercase-to-uppercase letter transitions within a word — so myVariableName, my-variable-name, and my_variable_name are all recognized as the same three words and convert identically to any target format.

Common use cases

  • Renaming a variable when porting code between languages with different conventions
  • Converting a database column name into a matching JavaScript property name
  • Turning a page title into a URL-safe kebab-case slug or a PascalCase component name

Worked example

myVariableName tokenizes as three words (my, Variable, Name) and converts cleanly to my_variable_name, my-variable-name, and MY_VARIABLE_NAME. userID tokenizes as two words (user, ID) and converts to user_id.

Common mistakes and edge cases

  • An acronym stays together as one word. APIResponse becomes api_response, XMLHttpRequest becomes xml_http_request and parseXMLResponse becomes parse_xml_response.
  • Digits stay with the letters before them, so version2Update is read as version2 and Update.

Frequently asked questions

How does the tool know where one word ends and another begins?
It splits on existing separators (spaces, hyphens, underscores) and on lowercase-to-uppercase transitions within a word (so "myVariableName" is recognized as three words: my, Variable, Name) — the same tokenization that lets it convert cleanly between any of the supported styles.
What is the difference between snake_case and kebab-case?
Both lowercase every word, but snake_case joins them with underscores (common in Python and database column names) while kebab-case joins them with hyphens (common in URLs and CSS class names).
What is CONSTANT_CASE used for?
CONSTANT_CASE (all uppercase, underscore-separated) is the conventional style for constant values in many languages, like C's or JavaScript's MAX_RETRY_COUNT.
Does this work on multiple lines at once?
Yes — paste a whole block of text and every conversion is applied to the full input, not just a single word or line.
How are acronyms like API or XML handled?
A run of capital letters is read as one word until the next capitalised word starts, so APIResponse becomes API and Response (snake_case: api_response) and XMLHttpRequest becomes XML, Http and Request (xml_http_request).
Why did my acronym change during case conversion?
The converter finds word boundaries from capital letters, spaces and separators. A run of capitals such as API or XML is treated as one word, so APIResponse becomes api_response. If a name has an acronym in the middle or an unusual mix, check the result and fix it by hand.

Related tools

More Code & Conversion

View all Code & Conversion tools →