First letter uppercase in word

You can change the capitalization, or case, of selected text in a document by clicking a single button on the Home tab called Change Case.

Change case

To change the case of selected text in a document, do the following:

  1. Select the text for which you want to change the case.

  2. Go to Home > Change case  .

  3. Do one of the following:

    • To capitalize the first letter of a sentence and leave all other letters as lowercase, click Sentence case.

    • To exclude capital letters from your text, click lowercase.

    • To capitalize all of the letters, click UPPERCASE.

    • To capitalize the first letter of each word and leave the other letters lowercase, click Capitalize Each Word.

    • To shift between two case views (for example, to shift between Capitalize Each Word and the opposite, cAPITALIZE eACH wORD), click tOGGLE cASE.

    Tips: 

    • To apply small capital (Small Caps) to your text, select the text, and then on the Home tab, in the Font group, click the arrow in the lower-right corner. In the Font dialog box, under Effects, select the Small Caps check box.

    • To undo the case change, press CTRL+ Z.

    • To use a keyboard shortcut to change between lowercase, UPPERCASE, and Capitalize Each Word, select the text and press SHIFT + F3 until the case you want is applied.

See also

Insert a drop cap

Choose AutoCorrect options for capitalization

Change case

To change the case of selected text in a document, do the following:

  1. Select the text for which you want to change the case.

  2. Go to Home > Change case  .

  3. Do one of the following:

    • To capitalize the first letter of a sentence and leave all other letters as lowercase, click Sentence case.

    • To exclude capital letters from your text, click lowercase.

    • To capitalize all of the letters, click UPPERCASE.

    • To capitalize the first letter of each word and leave the other letters lowercase, click Capitalize Each Word.

    • To shift between two case views (for example, to shift between Capitalize Each Word and the opposite, cAPITALIZE eACH wORD), click tOGGLE cASE.

    Tips: 

    • To apply small capital (Small Caps) to your text, select the text, and then on the Format menu, select Font, and in the Font dialog box, under Effects, select the Small Caps box.

      Small Caps shortcut key: ⌘ + SHIFT + K

    • To undo the case change, press ⌘ + Z .

    • To use a keyboard shortcut to change between lowercase, UPPERCASE, and Capitalize Each Word, select the text and then press fn+ SHIFT + F3 until the style you want is applied.

See also

Insert a drop cap

Choose AutoCorrect options for capitalization

PowerPoint for the web supports changing case. See the procedure below.

Word for the web doesn’t support changing case. Use the desktop application to open the document and change text case there, or else you can manually change the casing of text in Word for the web.

  1. Select the text you want to change.

  2. Go to Home > More Font Options > Change case.

    Select the "More Font Options" ellipsis button, select Change Case, and then select the option you want.

  3. Choose the case you want to use.

We can do this (C# 8.0, .NET 5):

input?.Length > 0 ? char.ToUpperInvariant(input[0]) + input[1..] : input

I believe that is short enough to do inline.


If input is an empty string, we get an empty string. If input is null, we get null.

Otherwise, the code takes the first character input[0] and convert it to uppercase with char.ToUpperInvariant. And concatenate the rest input[1..].

The compiler will convert the range access to a call to Substring, plus it can take advantage of the fact that we already got the length.

Over the accepted answer, this has the advantage of not using LINQ. Some other answers convert the string to array just to take the first character. This code does not do that either.


If you prefer an extension method, you can do this:

public static string FirstCharToUpper(this string input) =>
        input?.Length > 0 ? char.ToUpperInvariant(input[0]) + input[1..] : input;

What if you prefer to throw? OK, have it throw:

public static string FirstCharToUpper(this string input) =>
        input switch
        {
            null => throw new ArgumentNullException(nameof(input)),
            _ => input.Length > 0 ? char.ToUpperInvariant(input[0]) + input[1..] : input
        };

Here roughly equivalent code (since we are making an extension method, we can be a bit more verbose):

public static string FirstCharToUpperEquivalent(this string input)
{
    if (input == null)
    {
        throw new ArgumentNullException(nameof(input));
    }

    var length = input.Length;
    if (length == 0)
    {
        return input;
    }

    string firstCharacter = char.ToUpperInvariant(input[0]).ToString();
    return string.Concat(firstCharacter, input.Substring(1, length - 1));
}

I did a benchmark with 1000 rounds of 155 words (So they were called 155000 times), and this is the result:

Benchmarking type Tests
  TestAccepted         00:00:00.0465979
  TestProposalNoThrow  00:00:00.0092839
  TestProposalDoThrow  00:00:00.0092938
  TestProposalEquival  00:00:00.0091463

I ran it on Windows 10, Intel Core i3, using the code from Simple microbenchmarking in C# by Jon Skeet.

Updated: 12/30/2021 by

Microsoft Word

In Microsoft Word, you can use the keyboard shortcut Shift+F3 to change selected text between uppercase, lowercase, and title case.

Selecting a case

  1. Highlight all the text you want to change. If you want to change the case for the whole document you can use the Ctrl+A keyboard shortcut to select everything.
  2. Hold down Shift and press F3.
  3. When you hold Shift and press F3, the text toggles from sentence case (first letter uppercase and the rest lowercase), to all uppercase (all capital letters), and then all lowercase.

Note

If you are using a laptop or an Apple Mac, the function keys may not be enabled without the use of the Fn key. You may need to hold Fn, in addition to Shift, when you press F3.

If you’re not able to get Shift+F3 to work in Microsoft Word 2007 or later, you can try the following option instead.

  1. In the menu bar, on the Home tab, click the Change Case icon, which has an uppercase ‘A’ and lowercase ‘a.’

Change Case icon in Microsoft Word

  1. Select the appropriate option from the list of values. For example, if you want to change to all uppercase letters, select the UPPERCASE option. If you want to change to all lowercase letters, select the lowercase option.

Change Case menu in Microsoft Word

Tip

Use our text tool to convert any text from uppercase to lowercase.

Quickly convert text to uppercase

Updated on December 19, 2020

When you’re working on a Microsoft Word document and have a string of lowercase text that should be in uppercase, don’t retype it. Instead, use the Word Change Case tool to change some or all of the text to a different case, such as all caps.

Instructions in this article apply to Word for Microsoft 365, Word 2019, Word 2016, Word 2013, and Word 2010.

Microsoft Word Uppercase Shortcut Key

The fastest way to change text to all caps is to highlight the text and press the keyboard shortcut Shift+F3.

Press Ctrl+A to highlight all the text on the page.

You may need to press the shortcut combination a few times because the text in the document might be in another case such as sentence case or all lowercase.

On Word for Mac, select the text you want to change to uppercase, then press ⌘+SHIFT+K.

Change to Uppercase Using the Ribbon

Another way to change the text case is to go to the Home tab on the ribbon.

  1. Select the text you want to change to uppercase, then go to the Home tab.

  2. In the Font group, select the Change Case drop-down arrow.

  3. Choose UPPERCASE to change the selected text to all uppercase letters.

Word Online doesn’t have a shortcut that changes the case of the selected text. Either edit the text manually or open the document in the desktop version of Word to change the case.

Word offers other ways to change the text case:

  • Sentence Case: Capitalize the first letter of each selected sentence and change the remaining text to lower case.
  • lowercase: Change the selected text to lowercase.
  • Capitalize Each Word: Change the first letter of each selected word to uppercase format.
  • tOGGLE cASE: Change the first letter of every word to lowercase and the remaining letters to uppercase.

Any time you change the case format of text in Word, use the Ctrl+Z shortcut to undo it.

Don’t Have Microsoft Word?

Though it’s simple to do this in Microsoft Word, you don’t have to use Word to change the text to all caps. There are online services that perform the same function. For example, go to the Convert Case website or Capitalize My Title website and paste the text into the text field and choose from a variety of cases. Select from uppercase, lowercase, sentence case, capitalized case, alternating case, title case, and inverse case. After the conversion, copy the text and paste it where you need it.

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

Word offers you a few ways to change and control capitalization in a document when you’re trying to get stuff done.

Office Word Mobile
Image: iStock

Managing uppercase and lowercase text in Word can be a challenge. Sometimes Word automatically tries to correct a word based on capitalization but makes the wrong assumption. Other times you might have an entire word or phrase in lowercase that you want to convert to uppercase, or vice versa. Word provides several options and shortcuts that can help you more easily change and control the capitalization of text. Here’s how they work.

SEE: 83 Excel tips every user should master (TechRepublic)

For this article, I’m working with the version of Word from Microsoft 365. But the tips here apply to any desktop version of Word from the past few years though not to the free online edition.

By default, Word automatically capitalizes words in a certain context, such as those at the beginning of a sentence or the days of the week. If you’d prefer to handle the capitalization yourself, you can control these options. From Word, click the File menu and select Options. At the Word Options window, select the Proofing category and click the button for AutoCorrect Options (Figure A).

Figure A

Make sure the AutoCorrect tab is selected. Here, you can check or uncheck several options for capitalization. The first option automatically changes the second letter in a word from uppercase to lowercase if you type two uppercase characters in a row.

The next three options control capitalization for the first letter in a sentence, the first letter in a table cell, and the first letter in a day of the week.

The fifth option changes the appropriate letters in a word from uppercase to lowercase if you accidentally press the Caps Lock key and then turn it off in the middle of typing the word.

Experiment with some of these settings turned on and off to see whether the autocorrect feature helps you or gets in your way (Figure B).

Figure B

If you wish to keep all or most of these autocorrect settings enabled but don’t want certain words automatically changed, just add them as exceptions. To do this, click the Exceptions button.

The first section for First Letter will not change the first letter from lowercase to uppercase for any entries. Scroll down the list to see the existing entries. Select any you want to delete and click Remove. Type a new word or term that you want to include in the list and click Add (Figure C).

Figure C

The second section for Initial Caps will not change the second letter in a word from uppercase to lowercase if the first two letters are uppercase. Again, select any existing entries you want to remove. Type any words or terms you want to include and click Add (Figure D).

Figure D

The third section for Other Corrections applies to any words that don’t fit the first two sections. Type a word or words you wish to include and click Add (Figure E).

Figure E

When finished, keep clicking OK until you’ve closed all the Word Options windows and are back at your document.

Next, you can quickly change a word from lowercase to uppercase or vice versa. Place your cursor anywhere in a word whose case you want to change. If you need to change the case for multiple words, select them all. Click the Home menu and then click the Change Case button on the Ribbon (the one with the Aa symbol).

The button displays a menu with five options: Sentence case changes the word’s capitalization to match that of the overall sentence. Lowercase changes all the letters in the word to lowercase. Uppercase changes all the letters in the word to uppercase. Capitalize each word capitalizes only the first letter of the word or words. Toggle Case changes each individual letter in the word from uppercase to lowercase, or vice versa (Figure F).

Figure F

Finally, you can more quickly change the case of a word or words through a keyboard shortcut. Place your cursor in the word you want to change or select multiple words. Hold down the Shift key and press F3. Press F3 again and then again. As you press F3, Word cycles through three different capitalization modes: all uppercase, all lowercase, and first letters uppercase. Release the key when you’ve applied your desired capitalization (Figure G).

Figure G

Понравилась статья? Поделить с друзьями:
  • First letter of each word capitalized
  • First letter of a word is called
  • First letter in each word is the same
  • First letter bigger in word
  • First last names excel