Case Converter

Convert text between different casing formats

Input

Output

Select Case Format:

About the Case Converter

Every language and tool has its own naming convention. JavaScript wants camelCase variables, Python wants snake_case, CSS and URLs want kebab-case, and environment variables use CONSTANT_CASE. The Case Converter rewrites a name in any of these styles, so you can move identifiers between codebases without retyping them.

The formats

Here is the phrase user profile id in each style:

  • camelCase: userProfileId. JavaScript and TypeScript variables and functions, and the keys of many JSON APIs.
  • PascalCase: UserProfileId. Classes, React components, and TypeScript types.
  • snake_case: user_profile_id. Python and Ruby code, and database column names.
  • CONSTANT_CASE: USER_PROFILE_ID. Constants and environment variables.
  • kebab-case: user-profile-id. URLs, CSS class names, file names, and command-line flags.
  • Title Case: User Profile Id. Headings and labels. Every word is capitalised, including short ones like of and the.
  • Sentence case: User profile id. Buttons, menu items, and ordinary sentences.
  • lower case and UPPER CASE. Change the letters only, and keep spacing and punctuation exactly as typed.

How words are detected

The converter splits your text at spaces, hyphens, underscores, and changes from lower to upper case, so it can go from any format to any other. For example, XMLHttpRequest parser becomes xml_http_request_parser in snake_case and xmlHttpRequestParser in camelCase.

The code-style formats keep only letters and numbers, so punctuation such as ! or . is dropped. The whole input is treated as one name, so convert a list of identifiers one at a time rather than pasting them all at once.

Chaining tools

Apply to Input copies the result back into the input box, and the text you type carries over when you switch to another text tool. That makes it easy to trim stray whitespace with the Text Trimmer, then come back here to convert the cleaned-up name.

Frequently asked questions

What does the Case Converter tool do?
The Case Converter tool transforms text between different casing formats including camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case, Title Case, Sentence case, and more. It intelligently detects word boundaries and converts your text instantly.
What case formats are supported?
The tool supports 9 popular formats: camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case, Title Case, Sentence case, lower case, and UPPER CASE.
How does the tool detect word boundaries?
The Case Converter intelligently splits text by recognizing spaces, hyphens, underscores, and camelCase/PascalCase patterns. This means it can convert between any format to any other format automatically.
When should I use each case format?
Use camelCase for JavaScript variables, PascalCase for classes/components, snake_case for Python/Ruby, CONSTANT_CASE for environment variables, kebab-case for URLs/CSS, Title Case for headings, and Sentence case for regular text.