Skip to content

Case Converter

Change text to upper, lower, title or sentence case, or turn a name into camelCase, snake_case, kebab-case and two other identifier styles. Eleven modes in all.

0 characters · 0 lines

0 characters · 0 lines

What you enter is processed only in this browser and is never sent to a server. How it works

Bidirectional conversion between lowercase hello world and uppercase HELLO WORLD

How to use

Paste your text into “Input” and choose one of the eleven modes under “Conversion”. “UPPER CASE” is selected to begin with.

The eleven modes fall into two groups that behave differently. The first six change only the case of the letters and leave spacing, punctuation and line breaks alone. The last five are identifier styles used in programming. They turn the whole input into a single name and drop the spaces and symbols.

“Case rules (locale)” applies to the first six only. Choose an identifier style and it is locked, with the note “Doesn’t apply to identifier conversions like camelCase.”

What each mode produces

This is what each mode gives for the quick brown fox.

Conversion Result
UPPER CASE THE QUICK BROWN FOX
lower case the quick brown fox
Title Case The Quick Brown Fox
Sentence case The quick brown fox
iNVERSE cASE THE QUICK BROWN FOX
aLtErNaTe CaSe tHe QuIcK bRoWn FoX
camelCase theQuickBrownFox
PascalCase TheQuickBrownFox
snake_case the_quick_brown_fox
kebab-case the-quick-brown-fox
CONSTANT_CASE THE_QUICK_BROWN_FOX

“iNVERSE cASE” swaps upper and lower case letter by letter. The example above is all lowercase, so the result matches upper case, but Hello World becomes hELLO wORLD. “aLtErNaTe CaSe” starts in lowercase and switches with every letter. Spaces and digits are skipped and don’t take a turn.

The rules behind title case and sentence case

Both modes first turn the whole text into lowercase and then capitalize only the letters in certain positions. They know nothing about English grammar or proper nouns, so check the following cases before using the result.

Title Case

Capitalizes the first letter of every word, where words are separated by whitespace.

  • Articles and prepositions are capitalized like any other word. the lord of the rings becomes The Lord Of The Rings.
  • Capitals that were already there are lost. iPhone and NASA becomes Iphone And Nasa.
  • The part after a hyphen is not a new word. well-known becomes Well-known.
  • A word that starts with a bracket or a quotation mark isn’t capitalized. (draft) stays (draft).

Sentence case

Capitalizes only the first letter of the text and the first letter after a period, question mark or exclamation mark.

  • hello world. this is NASA! is it? yes becomes Hello world. This is nasa! Is it? Yes.
  • Names of people and places go lowercase as well. I met John in Paris becomes I met john in paris.
  • The dots in abbreviations and decimals count as sentence endings too. e.g. apple and version 2.5 beta becomes E.G. Apple and version 2.5 Beta.
  • A line break is not a sentence ending. In a list that breaks lines without periods, only the first line starts with a capital.

Where identifier styles split words

The five identifier styles split the input into words and then join them back together in the chosen style. Words are split in three places.

  • At whitespace, underscores (_), hyphens (-) and every other symbol that is neither a letter nor a digit
  • Where a capital letter comes right after a lowercase letter or a digit
  • Where a run of capitals is followed by a lowercase letter, just before the capital that precedes that lowercase letter (XMLHttp splits into XML and Http)

This means a name already written in one style can be converted to another.

Input Conversion Result
user_first_name camelCase userFirstName
user first name kebab-case user-first-name
XMLHttpRequest snake_case xml_http_request
parseHTMLString kebab-case parse-html-string
user2Name snake_case user2_name
price ($) CONSTANT_CASE PRICE

The symbols that separate words don’t appear in the result. A part made up only of symbols, as in the last row, disappears altogether. Brand names that begin with a single lowercase letter can split where you don’t expect. iPhone becomes i_phone in “snake_case”.

Case rules (locale)

Under “Case rules (locale)” you can choose “No locale (default rules)” or Turkish, Azerbaijani or Lithuanian, and “No locale (default rules)” is selected to begin with. The option exists because case rules sometimes differ by language. Turkish is the best-known example: the capital form of i is the dotted İ, and the lowercase form of I is the dotless ı.

Korean, English, Japanese, German and Spanish have no special rule of that kind. For text in those languages, leave the setting as it is. With Turkish or Azerbaijani selected, the uppercase of istanbul is İSTANBUL instead of ISTANBUL, and with Lithuanian selected, the accented capital Ì keeps the dot over the i when it is converted to lowercase.

Sources

Frequently asked questions

Why does the German ß turn into two letters, SS, in upper case?

The Unicode standard defines the uppercase form of the lowercase ß (Eszett) as the two letters SS. That holds whichever setting you choose under "Case rules (locale)". Convert straße with "UPPER CASE" and you get STRASSE, which is 7 characters instead of 6. Convert that back with "lower case" and you get strasse, not the original ß. If the text is going into a field with a character limit, check the length again after converting.

I entered several variable names, one per line, and they were merged into one. Can each be converted separately?

No. The five identifier styles treat the whole input as a single name. A line break is just another place where words are split, so entering first name and last name on two lines and choosing "snake_case" gives the single result first_name_last_name. Enter one name at a time. The six text modes, such as upper case, lower case and title case, leave line breaks as they are.

Can I use the converted result as a variable name as it is?

Usually, but check three things yourself. First, input that starts with a digit gives a result that starts with a digit. 2nd place becomes 2ndPlace in "camelCase", and you can't use that as it stands in a programming language that doesn't allow names to begin with a digit. Second, an apostrophe counts as a separator too, so don't stop becomes donTStop. Third, accented letters and non-Latin characters such as Hangul, Chinese characters and kana are kept as they are and not converted to plain English letters. 'crème brûlée' becomes 'crème_brûlée' in "snake_case".

Last updated: