|

How to Type the Pipe Symbol (|), the Vertical Bar

How-To Guides · 2 min read · Published October 25, 2026

Quick answer: on US and UK keyboards press Shift+\. On US keyboards the \ key is above Enter; on UK keyboards it is left of Z. On a German Windows keyboard press AltGr+<. On any Windows PC, Alt+124 on the numeric keypad types |.

Quick reference: every method

Every Alt code below is verified against the real Windows code pages — where none exists we say so, rather than list one that won’t work.

CharNameWindowsMacHTMLWord (Alt+X)Unicode
¦ Broken Bar Alt+0166 Copy / paste &#166; 00A6 + Alt+X U+00A6
¬ Not Sign Alt+0172 Option+L &not; 00AC + Alt+X U+00AC

Where | is

Keyboard / layoutKeys
US (Windows and Mac)Shift + \ (key above Enter)
UK Windows PCShift + \ (key left of Z)
German, WindowsAltGr + < (key left of Y)
Any Windows PCAlt+124 (numeric keypad)

If the key types something else, your layout setting may not match your keyboard; see keyboard symbols. No keypad? Use Win+. → Symbols, or copy | from this page.

Pipe | vs broken bar ¦

The vertical line | (U+007C) is the one on your keyboard and the one used in code. The broken bar ¦ (U+00A6, Alt+0166) is a separate character with a gap in the middle. Some older keyboards print the broken-bar shape on the key even though the key types |, which causes confusion. On UK keyboards the broken bar is typed with AltGr and the ` key. In code, shell commands and Markdown, always use |.

What | is used for

  • Terminals: dir | more or ls | grep txt sends one command's output to the next, which is where the name "pipe" comes from.
  • Programming: | and || mean "or" in many languages.
  • Markdown tables: columns are separated with |.
  • Maths: absolute value |x| and "divides" (a | b).
  • Titles and menus: a separator, as in "Home | About | Contact".

Phones

iPhone: 123 → #+=. Gboard: ?123 → =\<.

Related: backslash \ (on the same key), and our vertical line page.

Frequently asked questions

How do I type the pipe symbol?

Press Shift + \ on US and UK keyboards. On a German Windows keyboard press AltGr and the angle-bracket key left of Y. On any Windows PC, Alt+124 on the numeric keypad types |.

What is the difference between | and ¦?

| is the vertical line (pipe) used in code and commands. ¦ is the broken bar, a separate character with a gap in the middle. Some older keyboards print ¦ on the key but type |. Use | in code.

What is the pipe symbol used for?

It sends the output of one command to another in terminals, means "or" in many programming languages (often as ||), separates columns in Markdown tables, and shows absolute value in maths, as in |x|.

Looking for something else? Browse 1,000+ copy-paste symbols, the full Alt Codes finder, or the emoji picker.