CalcHub

Text Case Converter — camelCase, snake_case & More

Convert any text between camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE and Title Case — handles existing camelCase input correctly.

camelCase
userProfileSettings
PascalCase
UserProfileSettings
snake_case
user_profile_settings
kebab-case
user-profile-settings
SCREAMING_SNAKE
USER_PROFILE_SETTINGS
Title Case
User Profile Settings

Last reviewed 2026-10-19. Rates change — verify against the official sources linked below before relying on these figures.

What this is based on

  • Word splitting handles spaces, underscores, hyphens and camelCase/PascalCase boundaries.
  • Output uses lowercase bases — existing acronyms (APIKey) are normalized to 'apikey'.
  • Everything runs locally in your browser — pasted content is never uploaded, logged or stored.

Which case goes where

JavaScript/TypeScript: camelCase variables and functions, PascalCase classes and components. Python: snake_case for everything except classes (PascalCase). URLs and CSS: kebab-case. Environment variables and constants: SCREAMING_SNAKE. File names: kebab-case or snake_case depending on ecosystem.

Mixing them in a codebase is the rookie smell — consistency matters more than the choice itself.

The subtle bug in naive converters

Splitting only on spaces/underscores fails on 'userProfileSettings' — a naive converter produces 'userprofilesettings'. This tool inserts word boundaries at lowercase→uppercase transitions first, so camelCase input converts correctly to every other convention.

Frequently asked questions

What's the difference between camelCase and PascalCase?
camelCase starts lowercase (userName); PascalCase starts uppercase (UserName). JavaScript uses camelCase for variables, PascalCase for classes/components.
When should I use snake_case vs kebab-case?
snake_case in code (Python, Ruby, env-adjacent configs); kebab-case in URLs and CSS class names — hyphens can't appear in most programming language identifiers.
Why did myOutput become my-output?
The converter detects camelCase boundaries — myOutput splits into 'my output' first, then applies the target convention. That's the correct behavior.
Does it handle acronyms like APIKey?
They're normalized to lowercase ('apikey') — distinguishing intentional acronyms from word boundaries is genuinely ambiguous and no converter does it perfectly.

Related calculators