TheFileTools

How to change text to uppercase, lowercase or title case

Fix text typed with Caps Lock on, tidy headings, and turn phrases into camelCase or snake_case names.

A paragraph typed with Caps Lock on, a list of headings in mixed styles, a column name that has to become a variable name. Retyping is not needed for any of them.

Steps

  1. Open Case converter.
  2. Paste your text.
  3. Pick a style from the list above the text box. The result changes at once.
  4. Press Copy.

The nine styles

  • UPPERCASE and lowercase change every letter and nothing else.
  • Title Case makes everything lowercase and then capitalises the first letter of every word, including short words such as of and the. The part after a hyphen is capitalised too.
  • Sentence case makes everything lowercase and then capitalises the first letter of each sentence and each line.
  • camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE are naming styles used in code. They work line by line, drop all punctuation and join the words. The phrase user first name becomes userFirstName, UserFirstName, user_first_name, user-first-name or USER_FIRST_NAME.

The code styles also read existing names. Paste userFirstName, choose snake_case and you get user_first_name, because a capital letter after a lowercase letter is treated as the start of a new word.

What to check afterwards

The tool does not know which words are names. Title Case and Sentence case turn NASA into Nasa or nasa, and Sentence case leaves london and the word i in lowercase when they are in the middle of a sentence. Read the result once and fix those by hand.

In the code styles an apostrophe splits a word, so don't becomes don and t. For a web address made from a title, Slug generator is the better choice because it also removes accents. To swap one particular word everywhere, use Find and replace.