Skip to content

Hash sign # (pound sign, number sign)

The # symbol has many names: number sign, pound sign, hash and hashtag. On a US keyboard, press Shift+3. Copy it above.

U+0023 · NUMBER SIGN

Block: Basic Latin · Unicode 1.1 · Other punctuation

How to type it

Windows
Win + . (period) opens the emoji & symbol panel
Microsoft Word
0023, then Alt + X
Mac
Control + Command + Space opens the Character Viewer
Linux (GTK/IBus)
Ctrl + Shift + U, 23, Space

Codes for developers

Code point
U+0023
Unicode name
NUMBER SIGN
HTML entity
#
CSS
content: "\0023";
JavaScript / JSON
"\u0023"
Python
"\u0023"
URL encoding
%23
UTF-8
23
UTF-16
0023

Look-alike characters

  • MUSIC SHARP SIGN
  • NUMERO SIGN
  • FULLWIDTH NUMBER SIGN

One symbol, many names

  • Number sign: “#1 seller,” “Apt. #4B.” Read it as “number.”
  • Pound sign: the name on US phone keypads and in phone menus (“press pound”). It is usually traced to the old abbreviation for pounds of weight. In the UK, “pound sign” means £ instead.
  • Hash and hashtag: on social media, #topic groups posts by subject.
  • Octothorpe: a name coined at Bell Labs in the 1960s for the telephone keypad key.

Position changes the meaning in older US usage: before a number, # means “number” (#5 is number five); after a number, it means pounds (5# of flour is five pounds). You still see the second form in old recipes and shipping notes, but “lb” is clearer.

# vs. ♯ and №

  • ♯ (music sharp) is a separate character. In ♯ the vertical strokes are upright and the horizontal strokes slant upward; in # the horizontal strokes are level. Use ♯ in music notation.
  • C#, the programming language, is officially written with the number sign, even though it is pronounced “C sharp.”
  • № (numero sign) is the “number” abbreviation used in Russian and some European text.
  • # (fullwidth number sign) belongs to Chinese, Japanese and Korean fullwidth text.

If you are writing for an international audience, “No. 5” is clearer than “#5,” because outside North America many readers know # only as hash or hashtag.

# in code, Markdown and URLs

  • Comments: # like this in Python, Ruby, shell scripts and YAML.
  • Markdown: # at the start of a line makes a heading; ## makes a smaller one.
  • CSS: #header selects the element with that id, and #ff6600 is a hex color.
  • URLs: everything after # is a fragment that jumps to part of a page. Browsers don’t send it to the server.
  • C and C++: preprocessor directives like #include.
  • Excel: errors such as #N/A, and a cell full of ##### when the column is too narrow for its number.

Frequently asked questions

Why is # called the pound sign?

In the US, # long stood for pounds of weight when written after a number, as in 5# for 5 lb. Phone companies kept the name for the keypad key.

What is the difference between # and a hashtag?

The character is the same. A hashtag is a word or phrase that starts with #.

How do I type # on a keyboard?

Press Shift+3 on a US keyboard, on Windows or Mac.

Is # the same as the music sharp sign?

No. The sharp (♯) is a separate character with upright vertical strokes and slanted horizontal strokes.

Unicode data: Unicode Character Database 18.0.0 (unicode.org).

More symbols

All symbols · Copy and paste symbols · Emoji search