Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Putting Character Codes to Work.

Putting Character Codes to Work

Written by Allen Wyatt (last updated July 6, 2024)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021


3

If you know the ASCII or ANSI codes for a particular character, and you want to enter it into your document, you can do so by holding down the Alt key and using the numeric keypad. If you enter a three-digit code, then Windows assumes you want the ASCII character associated with that code. If you enter a four-digit code, then Windows assumes you want the ANSI character associated with that code.

For instance, the ASCII code for an uppercase A is 65. You could enter this character by holding down the Alt key and pressing 065 (a three-digit code) on the numeric keypad. It just so happens that this is the same as the ANSI code for an uppercase A, as well. Thus, you could hold down the Alt key and press 0065 (a four-digit code) for the same result. This works because the ASCII and ANSI codes are the same for all values between 0 and 127. When you work with values between 128 and 255, they are different.

You can see this difference by holding down the Alt key and pressing 163 (a three-digit code) on the numeric keypad. This inserts a foreign language character in your document. If you instead use a four-digit code for the same number (hold down the Alt key and press 0163), Word inserts the symbol for the British pound.

You should also know that you can use the Alt key with a regular value. For instance, you can type Alt and then the number 3 on the keypad. This inserts a character for a heart. The values between 0 and 31 do not represent printable characters in either ASCII or ANSI codes. If you hold down the Alt key and enter a number between 1 and 31 on the numeric keypad, Word inserts various miscellaneous dingbat characters in your document. The best way to see how this works is to simply try it in a document of your choosing.

Now for a technical aside: When you press Alt and follow it with a three-digit code, you are inserting characters from what is called the "code page 437," which is the set of characters used in the original IBM PC. When you use a four-digit code, you are inserting characters from what is called "code page 1252" or simply "Windows 1252." Even though I have so far in this tip referred to these as ANSI codes—as is done by many other mere-mortal users of Word—they aren't, technically ANSI codes. There are Microsoft's adaptation of ANSI codes to create what is (again, technically) called "Windows 1252."

More information than you wanted or needed to know? Probably.

Both the "code page 437" (ASCII) and "Windows 1252" (ANSI) code pages are single-byte codes, which is why they go from a value of 0 to 255. However, Unicode characters can use one byte (UTF-8), two bytes (UTF-16), or four bytes (UTF-32), which mean they can use values between 0 and 4,294,967,295. That's obviously a lot of characters, but not all of them are in use.

You can insert Unicode characters, if you know them, by holding down the Alt key and using the numeric keypad. Doing so can be a bit hit-and-miss because it can be difficult to remember such codes. To insert the full range of Unicode characters, you are better off to display the Symbols dialog box. (Display the Insert tab of the ribbon, click Symbol in the Symbols group, and then click More Symbols.) You can then choose a font and a Unicode subset. Word then displays the available characters in the dialog box, and you can select the character you want to insert.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (11219) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Word here: Putting Character Codes to Work.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Showing Text when a Cell is Empty

Wouldn't it be great if you could have Excel display some text in a cell only when that cell is empty? Unfortuantely, ...

Discover More

Unhiding a Single Column

In a worksheet with lots of hidden columns it is a real pain to try to unhide just one or two columns. The best solution ...

Discover More

Selecting Printing of Color Pictures

Do you want to control whether color pictures in your document are printed or not? It's not quite as easy as it may ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (ribbon)

Removing Duplicates in Word

If you have information in Word such as e-mail addresses or part numbers, your document might include duplicates. This ...

Discover More

Adding Hyphens to Phrases

Editing text to turn regular words into hyphenated phrases can be a real bother. The chore can become a breeze if you ...

Discover More

Capitalizing the First Letter after a Quote Mark

The AutoCorrect feature of Word will automatically capitalize the first letter of sentences as you type, unless the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

2024-07-09 10:40:48

Timothy J. McGowan

@Robert Love: It's not just Word; it's Windows. In Notepad, Alt+1 gives me a smiley face, Alt+3 gives me a heart, et cetera. I'm on Windows 10.

I find in Windows 11, however, Notepad and Word both refuse to acknowledge a number of combinations from Alt+1 through Alt+30, although Alt+11 inserts a line break, Alt+12 inserts a page break, Alt+13 inserts a paragraph break, and Alt+14 inserts a column break. Experimenting has elicited results that I'm unable to replicate just yet; an Alt+Numpad combination followed by a keyboard character will sometimes produce a symbol, but not always. I'd experiment more, but breaktime is over. :)


2024-07-07 04:34:50

Robert Love

For me ALT+numpad with numbers 0 to 31 doesn't work. It just does nothing, i.e. ALT+3 does not insert a heart as described in the tip. I am using Word 2010. Does anyone know which versions of Word it does work with?


2024-07-07 04:11:45

Robert Love

Very useful tip, thanks. For completeness you could mention that at least some of these ALT+numpad sequnces work throughout Windows, not just in Word. I find them especially useful in my Thunderbird email client, whose menu for inserting special characters is frustratingly awkward.

The article doesn't make entirely clear that it is talking only about decimal character codes. Unicode character codes are officially defined in hex, and if you have only the hex code the ALT+decimal technique is no use. This is presumably why Word allows you to insert insert any unicode character by typing its 4-digit hex code in the document and ALT+X immediately after that. For example, 2013 ALT+X produces an endash. I actually find this quicker than ALT+numpad.


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.