String Case Converter

Data Stays on Your Device

Convert text between camelCase, snake_case, kebab-case, PascalCase, and detailed title case.

Input Text
Loading...

Converted Cases

camelCase
snake_case
kebab-case
PascalCase
Title Case

What is the String Case Converter?

This tool converts text between the naming conventions used in programming and writing: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, and plain upper and lower case.

Naming conventions are not arbitrary, each ecosystem has settled on particular ones, and following them is part of writing code that reads naturally to other people working in that language.

JavaScript and Java use camelCase for variables and PascalCase for classes and components. Python and Ruby use snake_case for variables and functions. CSS and URLs use kebab-case. Environment variables and constants use CONSTANT_CASE. Databases conventionally use snake_case for tables and columns.

Converting between them by hand is tedious and error-prone, particularly across a list of names, which is exactly the situation that arises when mapping API fields to database columns or generating code from a schema.

How to use the String Case Converter

  1. Paste your text. Enter a single identifier or a list with one per line.
  2. Pick a target case. Choose the convention you want to convert to.
  3. Copy the result. Converted output is ready to paste into your code.
  4. Convert lists in bulk. Multiple lines are converted together, which is the efficient path when remapping a set of field names.

Worked examples

One phrase across every convention

The same words, formatted for each ecosystem's expectations.

Input
user profile image url
Output
camelCase:      userProfileImageUrl
PascalCase:     UserProfileImageUrl
snake_case:     user_profile_image_url
kebab-case:     user-profile-image-url
CONSTANT_CASE:  USER_PROFILE_IMAGE_URL
Title Case:     User Profile Image Url

Mapping API fields to database columns

APIs commonly return camelCase while databases use snake_case, so this conversion comes up constantly when writing a data layer.

Input
firstName
lastName
emailAddress
createdAt
Output
first_name
last_name
email_address
created_at

Common use cases

  • Porting code between languages. Moving logic from Python to JavaScript means renaming identifiers to match the target convention.
  • Writing database migrations. Converting a list of API field names to snake_case columns in one step.
  • Generating CSS class names. Turning component names into kebab-case selectors.
  • Creating environment variable names. Converting configuration keys to CONSTANT_CASE for a .env file.

Features and limitations

  • Supports camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, uppercase, and lowercase.
  • Detects word boundaries from existing casing, underscores, hyphens, and spaces.
  • Converts multi-line input in bulk.
  • Acronyms are a known ambiguity: whether URL becomes Url or URL in PascalCase depends on the convention you follow, so review output containing acronyms.
  • Leading digits and special characters are preserved rather than stripped, since removing them could produce invalid identifiers silently.

Frequently asked questions

What is the difference between camelCase and PascalCase?

Only the first letter. camelCase starts lowercase and is used for variables and functions; PascalCase capitalises the first letter and is used for classes, types, and React components.

When should I use snake_case versus kebab-case?

snake_case in Python, Ruby, and SQL identifiers. kebab-case in CSS class names, URLs, and file names, it cannot be used in most languages' identifiers because a hyphen reads as subtraction.

How are acronyms handled?

Acronyms are genuinely ambiguous. Some style guides write parseUrl, others parseURL. Both appear widely, so check the output when your identifiers contain acronyms and adjust to match your codebase.

Can I convert a whole list at once?

Yes. Put one identifier per line and all lines are converted together, which is the practical way to remap a set of fields.

Does it handle non-English text?

Case conversion works with Unicode text, though word-boundary detection is tuned for Latin-script conventions and may not segment other scripts as expected.

All processing happens locally in your browser, your data never leaves your device.