Text & Code

String Case Converter — camelCase, snake_case, kebab-case & More

Convert identifiers between 8 common case formats used in programming: camelCase for JavaScript, snake_case for Python, kebab-case for CSS, PascalCase for classes, and more. Conversion is instant as you type.

Input0 chars
camelCase

What is string case conversion?

Different programming languages and contexts use different naming conventions. camelCase uses lowercase first word with uppercase subsequent words. snake_case separates words with underscores. kebab-case uses hyphens. PascalCase capitalizes every word.

Why Use This Tool

  • Code migration — Convert identifiers between Python (snake_case) and JavaScript (camelCase).
  • API integration — Match external API naming conventions with your codebase.
  • Database mapping — Convert DB columns (snake_case) to code properties (camelCase).
  • CSS classes — Generate kebab-case class names from component names.
  • Environment variables — Convert names to CONSTANT_CASE for env vars.

Tips

  • Be consistent within a codebase.
  • camelCase is standard in JavaScript and TypeScript.
  • Python follows snake_case for most identifiers.
  • CSS classes typically use kebab-case.
  • Acronyms are treated as single words.

How to Use the String Case Converter

1

Enter text

Type or paste any identifier — camelCase, snake_case, or plain words.

2

Select target case

Click one of the 8 case format buttons.

3

View conversion

The converted text appears instantly.

4

Copy result

Click Copy to copy the converted string.

Worked Examples

To camelCase

Input
user_first_name
→
Output
userFirstName

To snake_case

Input
getUserById
→
Output
get_user_by_id

To kebab-case

Input
MyComponent
→
Output
my-component

To PascalCase

Input
user-profile-card
→
Output
UserProfileCard

To CONSTANT_CASE

Input
apiBaseUrl
→
Output
API_BASE_URL

Case Format Usage

FeatureFormatCommon Use
camelCasemyVariableJS/TS variables, functions
PascalCaseMyClassClasses, React components
snake_casemy_variablePython, Ruby, databases
kebab-casemy-classCSS, HTML, URL slugs
CONSTANT_CASEMY_CONSTConstants, env vars

Frequently Asked Questions

Does it handle mixed input?

Yes — input can be camelCase, snake_case, kebab-case, or plain words with spaces. The converter extracts words and reformats them in your chosen style.

What about acronyms?

Acronyms like XMLParser are treated as words. Conversion may split them: xml_parser in snake_case. Handle acronyms manually if your style guide requires XMLParser → xmlParser.

Which case for CSS?

BEM methodology uses kebab-case for blocks and elements: nav-bar__item--active. Tailwind uses kebab-case utility classes.

Which case for Python?

PEP 8 recommends snake_case for functions and variables, PascalCase for classes, and CONSTANT_CASE for module-level constants.