Text Transformation Studio

Case Converter - Convert Text Capitalization & Code Formats

Instantly convert your text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, kebab-case, and snake_case.

9 words Β· 44 characters

9 words Β· 44 characters

Which naming convention belongs where

Most programming languages cannot use spaces in identifiers, so developers join words with capital letters or separators. Each ecosystem has settled on its own convention, and mixing them makes code harder to read and search.

  • camelCase: variables and functions in JavaScript, TypeScript and Java (getUserName, totalPrice).
  • PascalCase: class names, types and React components (UserAccount, OrderSummary).
  • snake_case: variables and functions in Python (recommended by PEP 8), Ruby, and most SQL column names (created_at).
  • kebab-case: CSS class names, URL paths, HTML data attributes and file names. It cannot be used as an identifier in most languages because the hyphen is read as a minus sign.
  • Title Case: headings, book and article titles.
  • Sentence case: interface text, buttons and many web headings. Several large style guides, including Microsoft's, prefer it for headings because it reads more naturally.
  • UPPERCASE: acronyms, short labels and constant values, though constants usually also need underscores (MAX_RETRIES).

How each conversion treats your text

The input 'user account id' becomes userAccountId in camelCase, UserAccountId in PascalCase, user-account-id in kebab-case and user_account_id in snake_case. The four code formats first split the text into words: on spaces, punctuation, underscores and hyphens, and also on capital-letter boundaries inside existing identifiers, so getUserName becomes get_user_name and XMLHttpRequest becomes xml_http_request. Each word is lowercased before it is joined, and apostrophes inside words are dropped, so 'don't stop' becomes dontStop.

Title Case capitalises the first letter of each word but keeps short words (a, an, the, and, but, or, for, of, in, on, to, at, by and similar) lowercase unless they start or end the title or follow a colon. Words that already contain capitals after the first letter, such as iPhone, McDonald or NASA, are left exactly as typed, so 'the iPhone and NASA's plan' becomes 'The iPhone and NASA's Plan'. If the whole input is in capitals, it is lowercased first so it does not stay shouting. Sentence case lowercases the whole text and then capitalises the first letter of the text and the first letter after each full stop, question mark or exclamation mark, which also lowercases names and acronyms.

Edge cases worth checking

Acronyms are treated as one word and lowercased like any other, so 'Order total (USD)' becomes orderTotalUsd in camelCase and order_total_usd in snake_case. If your style guide keeps acronyms in capitals (orderTotalUSD), adjust those by hand.

Numbers become their own word: 'version 2.0 release' becomes version_2_0_release, and line breaks count as separators, so a multi-line input is joined into one long identifier. Accented letters are kept (cafΓ© stays cafΓ©), which is fine for CSS classes and URLs in most cases but not valid in every programming language.

There is no CONSTANT_CASE button. Convert to snake_case and then to UPPERCASE to get MAX_RETRIES style constants.

Title Case is not the same as headline style

Editorial style guides do not capitalise every word. Chicago style keeps articles, coordinating conjunctions and prepositions lowercase unless they start or end the title. AP and APA capitalise words of four letters or more and keep shorter minor words lowercase.

This tool follows the Chicago-style approach with a fixed list of short articles, conjunctions and prepositions. Longer prepositions such as 'between' or 'without' are capitalised, which AP would also do but some house styles would not, and words like 'is' or 'it' are always capitalised because they are not minor words. Check the result against your own style guide before publishing.

Renaming identifiers safely across a project

Converting one name is easy; changing it everywhere it is used is where bugs appear. In code, use your editor's rename or refactor command rather than find and replace, because it understands scope and will not touch a matching word inside an unrelated string or comment.

A common real case is an API that returns camelCase JSON keys to a Python or Ruby back end that uses snake_case. Most serialisation libraries can map between the two automatically, which is safer than renaming fields by hand in several places. For CSS classes, search templates and JavaScript as well as stylesheets before renaming, since class names are often built from strings.

Case Converter: frequently asked questions

What is the difference between camelCase and PascalCase?

Both join words with capital letters. camelCase starts with a lowercase letter (orderTotal) and is used for variables and functions, while PascalCase starts with a capital (OrderTotal) and is used for class names, types and React components in most style guides.

Which case should I use for database column names?

Lowercase snake_case is the safest choice. PostgreSQL folds unquoted identifiers to lowercase, so a column created as OrderTotal with quotes must be quoted in every query afterwards, while order_total works everywhere without quotes.

Should URLs be lowercase?

Yes. Domain names are case-insensitive, but the path part of a URL is case-sensitive on many servers, so /About and /about can be two different pages. Using lowercase kebab-case paths avoids duplicate URLs and broken links.

Will Title Case break brand names like iPhone or acronyms like NASA?

No. Any word that already has a capital letter after its first character is left unchanged, so iPhone, eBay, McDonald and NASA keep their capitals. The exception is an input typed entirely in capitals, which is lowercased first; restore acronyms by hand in that case.

Does the converter change my original text?

No. The original stays in the input box and the converted version appears separately, so you can try several cases on the same text and copy only the one you need.

All text processing suite