Case converter

Type or paste once, get every case at the same time. Built for variable names and headlines alike.

23 characters · 4 words · 1 lines
  • camelCase
    userAccountCreatedAt
  • PascalCase
    UserAccountCreatedAt
  • snake_case
    user_account_created_at
  • CONSTANT_CASE
    USER_ACCOUNT_CREATED_AT
  • kebab-case
    user-account-created-at
  • dot.case
    user.account.created.at
  • Title Case
    User Account Created at
  • Sentence case
    User account created at
  • UPPERCASE
    USER ACCOUNT CREATED AT
  • lowercase
    user account created at
  • aLtErNaTiNg
    uSeR aCcOuNt CrEaTeD aT

Naming conventions by language

Language / placeVariables & functionsTypes / classesConstants
JavaScript / TypeScriptcamelCasePascalCaseCONSTANT_CASE
Python (PEP 8)snake_casePascalCaseCONSTANT_CASE
GocamelCase (exported: PascalCase)PascalCasePascalCase / camelCase
Rustsnake_casePascalCaseCONSTANT_CASE
SQL columnssnake_case——
CSS classes, URLskebab-case——

Renaming across a codebase? A regex replace does it: in the regex tester, _(\w) finds each underscore-letter pair in snake_case so you can see every spot that needs changing.

Questions

Which case should I use for what?

By common convention: camelCase for JavaScript/Java variables and JSON keys, PascalCase for classes and React components, snake_case for Python and SQL column names, CONSTANT_CASE for constants and environment variables, kebab-case for URLs, CSS classes and CLI flags.

How does it handle acronyms like HTTP or ID?

It splits "parseHTTPResponse" into parse / HTTP / Response, then re-cases each word, giving parse_http_response or parseHttpResponse. Style guides differ on acronyms (Google's Java guide uses parseHttpResponse), so check yours.

What rules does Title Case follow?

Every word is capitalised except short articles, conjunctions and prepositions (a, an, the, and, of, in, on, to…) — unless they start the text or follow a colon. That matches the core of the Chicago and AP styles; they differ on a few words such as "with" and "from".

Can I convert many lines at once?

Yes. With "Each line separately" on, a list of names — one per line — is converted line by line, which is handy for turning a column of database fields into variable names.