String Case Converter

Convert text between camelCase, PascalCase, snake_case, kebab-case, and more

camelCase
myVariableName
PascalCase
MyVariableName
snake_case
my_variable_name
SCREAMING_SNAKE_CASE
MY_VARIABLE_NAME
kebab-case
my-variable-name
COBOL-CASE
MY-VARIABLE-NAME
dot.case
my.variable.name
Title Case
My Variable Name
UPPERCASE
MY VARIABLE NAME
lowercase
my variable name

About this tool

The String Case Converter transforms text between every common programming naming convention: camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, kebab-case, COBOL-CASE, dot.case, Title Case, UPPERCASE, and lowercase. It intelligently splits compound words regardless of the source format.

When to use it

  • โ†’Renaming variables when switching languages (Python uses snake_case, JS uses camelCase)
  • โ†’Converting API field names to match your codebase's convention
  • โ†’Transforming database column names into JSON keys for API responses
  • โ†’Normalizing user-supplied input strings to a consistent internal format

Tips

  • โ—†Input can be any mix of formats โ€” the converter handles camelCase, PascalCase, snake_case, and space-separated words as input.
  • โ—†kebab-case is required for CSS class names and HTML attributes. camelCase is required for JavaScript identifiers.

Frequently asked questions

Why do different programming languages use different naming conventions?

Naming conventions evolved independently with each language's community. Python's PEP 8 standardized snake_case for readability. JavaScript inherited camelCase from Java. CSS adopted kebab-case because hyphens are not operators in CSS. Databases favor snake_case for SQL compatibility. Each convention also reflects the language's syntax constraints โ€” hyphens are invalid in JS identifiers, for example.

What is the difference between camelCase and PascalCase?

Both concatenate words without separators and capitalize the first letter of each word โ€” except camelCase keeps the very first letter lowercase (myVariableName) while PascalCase capitalizes everything (MyClassName). PascalCase is also called UpperCamelCase or StudlyCase. In most languages, PascalCase is for types and classes while camelCase is for variables and functions.

When should I use SCREAMING_SNAKE_CASE?

SCREAMING_SNAKE_CASE (all caps with underscores) is the standard for constants and environment variables โ€” MAX_RETRIES, DATABASE_URL, API_KEY. The all-caps convention signals that the value should not change at runtime. In Python it's the recommended style for module-level constants per PEP 8.

How does the converter handle already-mixed input?

The converter tokenizes the input by splitting on case transitions (camelCase), underscores, hyphens, and spaces โ€” then rejoins the tokens in the target format. So 'myAPIKey', 'my_api_key', 'my-api-key', and 'My Api Key' all produce the same token list [my, api, key] before being reformatted.

Related tools

๐Ÿฅท ToolNinja