Typing guides

Underscore Symbol (_): How to Type It on Your Keyboard

By Dalil · November 23, 2026

1-minute answer

Windows and Mac, U.S. layout: hold Shift and press the hyphen/minus (-) key beside 0 on the top row. Mobile: open the symbols keyboard and look for _. Copy _ below if the key is unavailable.

Choose a character to copy, then paste it into your text.

Manual copy: _

This practice field is not submitted by this tool.

Quick reference and copy/paste

CharacterName / useUnicodeWindows keypad
_Underscore / low lineU+005FAlt + 0095
-Hyphen-minus; a different characterU+002DKeyboard hyphen key
‗Double low line; not two underscoresU+2017Use copy/paste

Type an underscore in Microsoft Word

In a normal Word paragraph, the U.S. keyboard shortcut Shift + the hyphen key (-) is quickest. The Unicode and menu methods below are alternatives when a key is unavailable.

Word for Windows: the Alt + X shortcut

  1. Type 005F at the insertion point.
  2. Select only those code characters, especially if another letter or number is beside them.
  3. Press Alt + X. The code becomes _.

No number pad is needed for Word’s Alt + X method. Use it in desktop Word for Windows; on a Mac or in Word for the web, use the methods for your device or paste the character.

Word for Windows: type 005F, select it, and press Alt plus X to insert _

Insert Symbol in Word

  1. In desktop Word for Windows, choose Insert → Symbol → More Symbols.
  2. Choose a text font containing the character. Look under Basic Latin when that subset is listed.
  3. Select _ and click Insert, then close the dialog.

In Word for Mac, try Insert → Advanced Symbol → Symbols, or use Character Viewer. Microsoft’s instructions cover the Mac symbol menu.

Excel, PowerPoint, Google Docs, and Sheets

Excel

Type _ with Shift + the top-row hyphen key on a U.S. layout, or paste it into the cell. To replace spaces in A1 with underscores, use =SUBSTITUTE(A1," ","_"). SUBSTITUTE changes the text; it does not check whether the result is a valid filename or username.

PowerPoint

Click inside a text box and paste _. In desktop PowerPoint for Windows, you can also choose Insert → Symbol. On a Mac, use Character Viewer or the keyboard method below.

Google Docs: Special characters

  1. Open the document on a computer and place the cursor in the text.
  2. Choose Insert → Symbols → Special characters. Some versions show Special characters directly under Insert.
  3. Search for low line, or enter the Unicode value from the reference table.
  4. Click the matching character to insert it.

This is Google Docs’ Special characters picker; it is separate from the emoji menu.

Google Sheets: paste or CHAR

In Sheets, paste _ into a cell or enter =CHAR(95). Sheets’ CHAR function uses Unicode numbers; Sheets does not have the Docs Special characters picker.

Type an underscore on Windows

Use the keyboard key

On a U.S. keyboard, press Shift + the hyphen key (-) using the hyphen/minus key next to 0, not the numeric-keypad subtract key. If the key label does not match the result, check the selected input layout.

U.S. keyboard with Shift and the top-row hyphen key highlighted to type an underscore _.

Numeric-keypad Alt code

  1. Click in the text field and enable Num Lock if your keypad requires it.
  2. Hold Alt and enter 0095 on the numeric keypad.
  3. Release Alt and check for _.

Use the number pad and keep the leading zero. The row of numbers above the letters will not work for this method. If your laptop has no number pad, use Character Map below. Microsoft explains Windows character entry.

Character Map: for laptops without a number pad

  1. Open Start, search for Character Map, and open it.
  2. Choose a suitable text font. Enable Advanced view if you need the search controls.
  3. With Unicode selected, enter 005F in Go to Unicode when that field is available, or locate _ in the grid.
  4. Click Select → Copy, then paste into your document.

If you cannot find the character, try another font. You can also open Windows + . → Symbols and browse the available categories. The Windows symbol panel varies by version, so use Character Map if it is not listed.

Type an underscore on a Mac

On the U.S. or ABC input source, hold Shift and press the - key. Other input sources may place underscore differently. The shortcut uses the top-row hyphen key.

Character Viewer alternative

  1. Place the cursor where the character belongs.
  2. Choose Edit → Emoji & Symbols, or try Control + Command + Space.
  3. Expand the viewer if necessary, find _ by name, and insert it.

If a shortcut gives you the wrong character, check your input source in Keyboard Viewer. Character Viewer is the fallback for inserting the character directly.

iPhone, iPad, and Android

On iPhone/iPad, tap 123, then #+=, and choose _. On Android, open ?123 or the equivalent symbols page; underscore may be there or on the next page. Keyboard apps use different arrangements. Avoid inserting a dash when the form specifically requires an underscore.

Type it often? On iPhone or iPad, add the character under Settings → General → Keyboard → Text Replacement. Choose a short trigger you will not type by accident. Apple’s text-replacement guide explains the setup.

Underscore, hyphen, and underline are different

An underscore is a text character: first_name. A hyphen-minus is another character: first-name. Underline is formatting applied to existing text, often with Ctrl + U in Word. Pressing Ctrl + U does not type an underscore.

Three underscores followed by Enter may trigger an automatic paragraph border in Word when automatic border formatting is enabled. If that happens, undo the conversion and adjust Word’s AutoFormat As You Type settings if needed. Microsoft explains the underline and border behavior. For a fill-in line in a document, a form field or tab leader is easier to keep aligned than a long row of underscores.

In HTML source, _ can be written literally or as _; it does not need escaping in ordinary text. Its Unicode name is LOW LINE in the Basic Latin chart (PDF). It is not a whitespace character.

Troubleshooting and common questions

Why does the hyphen work but the underscore does not?

Try the other Shift key, then test in a simple text editor. Check the active keyboard layout and compare with the Windows On-Screen Keyboard. If the on-screen version works but the physical combination fails, investigate the keyboard or remapping settings rather than changing the document.

Can I type _ without the Shift key?

Yes. Copy it, use Character Map, or use Word’s 005F conversion. Windows Alt + 0095 is another numeric-keypad alternative in compatible apps.

Can an underscore replace a space in an email address?

Only when it is actually part of the address. first_name and firstname can identify different mailboxes. Copy the address exactly; underscores are not a general replacement for spaces.

Why is the underscore hidden in a link?

A link’s underline can visually overlap the low line. Copy the text into a plain-text field or inspect the address carefully rather than assuming the character is missing.

Quick recap

On a U.S. keyboard, Shift + the top-row hyphen key types _. An underscore is a character; underlining is formatting.

For other literal keyboard characters, browse SymbolHelper’s tools.