Skip to content

U+2015 · General Punctuation

Horizontal Bar

Horizontal Bar is the Unicode character U+2015 (official name “HORIZONTAL BAR”) from the General Punctuation block. It belongs to SymbolHero’s punctuation collection. Copy it with the button, or use the codes and keyboard methods below to type it yourself.

UnicodeU+2015
HTML―
U+2015

Character codes

Unicode code pointU+2015
Decimal8213
HTML named entity―
HTML (hex)
HTML (decimal)
CSS\2015
JavaScript\u2015
Python\u2015
UTF-8 bytesE2 80 95
UTF-162015
URL-encoded%E2%80%95

Character details

Official nameHORIZONTAL BAR
Unicode blockGeneral Punctuation
General categoryDash Punctuation (Pd)
SymbolHero categoryPunctuation
EmojiNo

How to type ―

Windows

  • In Microsoft Word or Outlook: type 2015 then press Alt + X.
  • Open Character Map (search “Character Map” in Start), tick “Advanced view”, search for “horizontal bar”, then Select and Copy.

Mac

  • Press Control + Command + Space to open the Character Viewer, search “horizontal bar”, and double-click the result.
  • With the Unicode Hex Input keyboard enabled (System Settings → Keyboard → Input Sources), hold Option and type 2015.

iPhone & Android

  • Tap Copy at the top of this page, then long-press where you want it and choose Paste.

Docs & web

  • Google Docs: Insert → Special characters, then search “horizontal bar” or enter U+2015.
  • HTML: ― or
  • Excel / Google Sheets: =UNICHAR(8213)

Questions

What is the Unicode for ―?

It is U+2015 (HORIZONTAL BAR), decimal 8213.

Is there a Windows Alt code for it?

No standard Alt code exists for this character. In Word type 2015 then Alt+X, or copy it from this page.

How do I type it on a Mac?

There is no built-in Option shortcut. Use the Character Viewer (Control + Command + Space) and search “horizontal bar”, or copy it from this page.

What is the HTML code?

Use the named entity ― or the numeric reference ―.