How to Type the Hash Symbol (#) on UK, US and Mac Keyboards
Quick answer: on a US keyboard press Shift+3. On a UK PC keyboard, # has its own key next to Enter (it also has ~ on it). On a UK Mac, press Option+3. On any Windows PC, Alt+35 on the numeric keypad always works.
Where # is on each keyboard
| Keyboard / layout | How to type # | What Shift+3 gives |
|---|---|---|
| US (Windows or Mac) | Shift + 3 | # |
| UK Windows PC | # key left of Enter (no Shift) | £ |
| UK Mac (British layout) | Option + 3 | £ |
| Any Windows PC | Alt+35 on the numeric keypad | - |
If # appears where you don't expect it, the layout in your settings probably doesn't match the keyboard in front of you. Switch layouts with Win+Space on Windows or from the input menu on a Mac. More on this in keyboard symbols.
Laptops and compact keyboards
Some UK laptops print # on a small key or share it with another symbol. If you can't find it, Alt+35 needs a numeric keypad, so the simplest fallback is the Windows symbol panel (Win+. → Symbols → punctuation) or copying # from this page. See Alt codes not working for keypad-free options.
Phones
On iPhone tap 123, then #+=; # is on the second symbols page. On Gboard, tap ?123; # is on the first symbols page.
Names for #
- Hash (UK), number sign or pound sign (US, from phone keypads and "#2 pencil").
- Hashtag when used to tag posts on social media.
- Octothorpe, a name from the telephone industry.
Because "pound sign" means # in the US but £ in the UK, say "hash" or "number sign" in international instructions. The £ sign is covered in currency symbols.
# in code and on the web
# starts comments in Python and shell scripts, a fragment in URLs (everything after # is not sent to the server, so encode a literal # as %23), and a heading in Markdown. In HTML, # is its numeric entity.
Frequently asked questions
How do I type # on a UK Mac?
Press Option + 3. On the British layout Shift + 3 types £, so the hash sign moves to Option + 3.
Why does Shift + 3 give £ instead of #?
Your keyboard layout is set to UK (British). On that layout £ is on Shift + 3 and # has its own key next to Enter on a PC, or Option + 3 on a Mac.
What is the Alt code for #?
Alt+35, typed on the numeric keypad. It works on any keyboard layout.
Is # the same as the music sharp sign ♯?
No. ♯ (U+266F) is the music sharp sign; # (U+0023) is the number sign. Use ♯ only in music notation.
Looking for something else? Browse 1,000+ copy-paste symbols, the full Alt Codes finder, or the emoji picker.