What the pipe symbol does
- Command line: in a terminal, the pipe sends one command’s output into the next, as in
ls | sort. That is where the name pipe comes from. - Logical OR:
||means “or” in C, Java and JavaScript; a single|is bitwise OR. - Math: |x| is the absolute value of x, so |−5| = 5. Double bars, as in ‖v‖, often mark the length of a vector.
- Separators: page titles and menus such as “Pricing | Acme” use it to divide items.
- Markdown tables: pipes draw the columns. To show a literal pipe inside a cell, put a backslash before it.
- Discord spoilers: text wrapped in double pipes stays hidden until someone clicks it.
| vs. ¦, ∣ and other look-alikes
- ¦ (broken bar) has a gap in the middle. Some older keyboards printed the pipe key that way, but the key types | on modern systems.
- ∣ (divides) is the math relation “divides”: 3 ∣ 12 reads “3 divides 12.”
- ǀ (dental click) is a letter used to write click sounds in Khoisan languages of southern Africa.
- │ (box drawing) draws lines in text-based tables and terminal interfaces.
- l and I: in many sans-serif fonts, the lowercase L and the capital i look almost like |, which matters when you read passwords and codes aloud.
Search tools and code treat all of these as different characters, so copy the exact one you need.
Typing | on keyboards and phones
On US keyboards, the pipe shares a key with the backslash, above Enter (above Return on a Mac). Hold Shift and press it. On Windows you can also hold Alt and type 124 on the numeric keypad.
- iPhone: switch to the numbers keyboard, then tap #+= to find |.
- Android (Gboard): it is on the second symbols page, opened with the
=\<key. - LaTeX:
|in math mode for absolute values,\midfor “divides” and for “such that” in set notation, and\|for the double bar.
Frequently asked questions
How do I type the vertical bar on a keyboard?
On a US keyboard, hold Shift and press the backslash key above Enter.
Why is it called the pipe symbol?
Because in Unix shells it pipes the output of one command into another.
What does || mean?
In most programming languages, logical OR. In Discord, text between double pipes is a spoiler.
What is the broken bar ¦?
A separate character with a gap in the middle. It resembles an old keyboard label for the pipe, but the two are not interchangeable.
Unicode data: Unicode Character Database 18.0.0 (unicode.org).