How to Type the Underscore Symbol

Copy the underscore and learn its U.S. keyboard position, Unicode and HTML values, mobile symbol layers, layout differences, and troubleshooting steps.

T

Technobezz Editorial

Editorial Team

Aug 24, 2026
5 min read

Copy the underscore

Copy U+005F LOW LINE, the single Basic Latin character commonly called an underscore.

  • Low line

    U+005F

    Also called underscore, underbar

Choose a copy button to place a character on the clipboard.

Ways to type an underscore

The physical key depends on the active layout; character-code methods identify U+005F directly.
PlatformMethod
Windows U.S. layout

Keyboard shortcut

Shift plus Hyphen
  1. Hold Shift.
  2. Press the hyphen key beside 0.
Shift+Hyphen

This key position is specific to Microsoft's U.S. layout.

Microsoft Word on Windows

Unicode conversion

Alt plus X
  1. Type 005F.
  2. Press Alt and X.
005F, then Alt+X

This is a Word feature, not a universal Windows shortcut.

macOS

Keyboard Viewer

  1. Open Keyboard Viewer from the Input menu.
  2. Hold Shift to reveal shifted characters.
  3. Select the key showing underscore.

Keyboard Viewer reflects the active input source.

Phones and tablets

Onscreen symbol layer

  1. Open the number or symbol layer.
  2. Open the additional symbol layer if needed.
  3. Select underscore.

Exact labels and positions vary by keyboard app, language, device, and orientation.

HTML

Literal character or character reference

_, _, _, or _

Each form represents U+005F in HTML.

U.S. punctuation key mapA simplified U.S. keyboard reference showing punctuation pairs and their shifted characters.U.S. KEYBOARD REFERENCEPunctuation changes with ShiftThe upper label is produced with Shift on the U.S. layout.
U.S. punctuation key mapU.S. punctuation pairs. Check the active software layout when the printed keycaps or output differ.

Contents

Don't Miss the Good Stuff

Get tech news that matters delivered weekly. Join 50,000+ readers.

Copy _ to insert an underscore immediately. On a standard U.S. Windows keyboard, hold Shift and press the hyphen key beside 0. That key position is layout-specific, so switch to the intended input layout or use a character picker if the result differs. The underscore is U+005F LOW LINE, not a long dash, underline style, or blank space.

Copy and identify the underscore

The character _ has the Unicode code point U+005F and the formal Unicode name LOW LINE. It is one Basic Latin character. A visual underline applied to a word is formatting, while an underscore remains part of the text and can appear in usernames, file names, identifiers, and URLs. Use the Symbol Finder to compare other punctuation characters.

Type an underscore on a physical keyboard

U.S. keyboard layout

  1. 1.Place the insertion point.
  2. 2.Hold Shift.
  3. 3.Press the key that produces a hyphen without Shift, located beside 0 on Microsoft's U.S. layout.

The result should be _. This description is deliberately scoped to the U.S. layout. The printed keycap does not determine the active software layout, and a different layout may map the same physical key to another character.

Other keyboard layouts

On Windows, check the input-language indicator in the taskbar. Windows+Space cycles through installed layouts, so use it only when you know which installed layout you want. Microsoft's published keyboard-layout pages show the base and shifted characters for each layout. On Mac, open Keyboard Viewer from the Input menu, hold Shift, and observe which key displays _. That viewer reflects the active input source instead of assuming U.S. placement.

Find the underscore on a phone or tablet

On an onscreen keyboard, switch from letters to the number or symbol layer, then choose _. A second symbol layer may be required. Labels and positions vary by keyboard app, language, device, and orientation, so instructions such as a universal key sequence would be misleading. Apple's iPhone and iPad guides describe switching keyboard modes, and Google's Pixel Tablet help shows how to open additional onscreen symbol layouts. If the symbol is not visible, inspect the additional symbol page or copy it from this guide.

Use Word or a character picker

Word Unicode conversion

In Microsoft Word on Windows, type 005F and press Alt+X. Word converts the hexadecimal value to _. This is useful when the active layout is unknown, but Alt+X works inside Word; it is not a system-wide Windows shortcut.

Mac Keyboard Viewer

Choose the Input menu in the macOS menu bar and open Keyboard Viewer. Press modifier keys to reveal the active mapping, then select the key that produces _. If the Input menu is hidden, add the desired input source in Keyboard settings first. Apple documents both input-source management and Keyboard Viewer.

Unicode and HTML values

  • Unicode name: LOW LINE
  • Code point: U+005F
  • HTML named reference: _
  • HTML decimal reference: _
  • HTML hexadecimal reference: _

HTML may also contain the literal _. The named and numeric forms all resolve to the same Basic Latin character. In Markdown, underscores can act as formatting delimiters depending on context, so escape or place them in code markup when the source syntax requires a literal character.

Troubleshoot a missing or wrong underscore

  1. 1.Type in a plain-text field to determine whether the issue affects one app or the whole system.
  2. 2.Check the active keyboard layout or input source before changing hardware.
  3. 3.Test both Shift keys; accessibility settings or a stuck modifier can change the result.
  4. 4.Open Windows On-Screen Keyboard or macOS Keyboard Viewer to compare the active mapping with the physical keycap.
  5. 5.If the visual key works but the physical key does not, reconnect the keyboard, try another port, or test another keyboard.

If the same layout problem affects email entry, use the separate at-key troubleshooting guide. For a different long punctuation mark, see how to type an em dash.

Official references

Share

Related symbols

Continue with another copy-and-type reference.

More symbol and keyboard help