Underscore “_” on the keyboard: how to type it
Quick answer
In Windows on a US keyboard, you type “_” with Shift + -. Same on a Mac.
Shift+-
Also called: low line, understrike.
All ways to type “_”
PC, laptop, Mac, phone or code – pick what you have in front of you.
Windows · US keyboard
Shift+-
Alt code (numeric keypad)
Alt+95
Type Alt codes with the numbers on the numeric keypad while holding the left Alt key.
Mac · US keyboard
Shift+-
Linux · US keyboard
Shift+-
Android (Gboard)
?123 then _
Switch to the symbols and tap the character.
iPhone and iPad
123 then #+= then _
Switch to the symbols and tap the character.
Windows · Czech (QWERTZ)
Shift+-
Windows · German (QWERTZ)
Shift+-
Windows · French (AZERTY)
_
HTML and Unicode
_U+005FFor web pages and apps that can insert a character by its code.Keys and fingers
Hold Shift with the little finger of the other hand. Press - with your right little finger.
Try it
Type “_” five times in a row.
0 of 5
Everything stays on this page, nothing is saved.
Don’t mix them up
Similar characters, different keys.
Underscorethis page
Shift+-
It replaces spaces in file names, usernames and code (my_variable).
Equals sign
=
The result in maths (2 + 2 = 4) and assignment in code.
Plus sign
Shift+=
Addition in maths and the international prefix in phone numbers (+44).
Questions
What is “_” used for?
It replaces spaces in file names, usernames and code (my_variable).
How do I type “_” on a Mac?
On a Mac with a US keyboard: Shift + -.
How do I type “_” on a phone?
On iPhone and iPad, tap 123 → #+= → _. On Android with Gboard, tap ?123 → _.