Vertical Bar (Pipe) (|)

The vertical bar (pipe) | is Unicode U+007C, the vertical bar symbol used for command piping in UNIX, logical OR in programming, and absolute value in maths. Press Copy to put it on your clipboard.

Unicode
U+007C
HTML
|
Word
007C Alt+X

How to type the vertical bar (pipe) (|)

The quickest way is to press Copy above and paste. To type | yourself, use the method for your device below.

Windows

  1. In Word or Outlook, type 007C and press Alt + X. Alt + X converts the hex code before the cursor into the character, and back again.
  2. Press Win + R, type charmap and press Enter. Tick “Advanced view”, search for Vertical Line, then Select and Copy. Character Map is built into every version of Windows.

Mac

  1. Press Control + Command + Space to open the Character Viewer, search for vertical bar and double-click it.
  2. With the Unicode Hex Input keyboard enabled (System Settings → Keyboard → Input Sources), hold Option and type 007C.

Linux & ChromeOS

  1. Press Ctrl + Shift + U, type 7c, then press Enter or Space. Works in GTK and IBus apps (GNOME, Firefox, Chrome, LibreOffice) and on ChromeOS.

iPhone & iPad

  1. Copy | from this page, then go to Settings → General → Keyboard → Text Replacement and add it with a shortcut such as ;vert. The shortcut then turns into the symbol as you type, in every app.

Android

  1. In Gboard, tap ?123, then =\<. | is on that page.
  2. Copy | here, then open Gboard settings → Dictionary → Personal dictionary and add it with a shortcut.

Microsoft Word

  1. Type 007C, then press Alt + X.
  2. Insert → Symbol → More Symbols. Set “from” to Unicode (hex), type 007C in “Character code” and click Insert.

Google Docs

  1. Insert → Special characters, then search for “vertical bar” or draw it in the box.

Excel & Google Sheets

  1. Enter =UNICHAR(124) in a cell. It works in Excel 2013 and later and in Google Sheets.

HTML

  1. Write &vert; or &#124; in your HTML.

What does | mean?

The | symbol, officially designated as VERTICAL LINE in Unicode (U+007C), is universally known in computing as the "pipe". Douglas McIlroy of Bell Labs conceived the concept of the software pipeline in 1964, which was implemented in early UNIX during the 1970s. The pipe operator redirects the standard output stream of one command directly into the standard input stream of another command, enabling users to chain simple tools together seamlessly: for example, cat data.txt | grep error | sort. This philosophy of modular software construction revolutionised modern computing architecture.

In programming languages including C, C++, Java, and JavaScript, the vertical bar performs fundamental logical and mathematical roles. A single | functions as the bitwise inclusive OR operator, while the double bar || represents boolean logical OR in conditional statements. In modern Python type hints, | denotes union types, such as int | str.

Outside software development, the vertical bar is a cornerstone of mathematics. A pair of bars flanking an expression denotes absolute value (such as |x|), matrix determinants, or the cardinality of a set. In formal logic and set theory, a vertical bar stands for "such that", as in {x | x > 0}. In typography and website design, | is frequently used as a crisp visual separator in navigation headers and page titles. Compare it with the backslash \, the ampersand &, and the tilde ~ in our keyboard symbols index.

Common uses

  • UNIX pipeline redirection: streaming output from one command into another (e.g., ps aux | grep node)
  • Boolean and bitwise logic: double bar || for logical OR, and single bar | for bitwise OR
  • Mathematical notation: absolute values |x|, vector norms, matrix determinants, and conditional probability P(A|B)
  • Visual dividers: separating links in website navigation bars and metadata footers (e.g., Home | About | Contact)

Vertical Bar (Pipe) codes for HTML, CSS and programming

Every code below produces |. Use the HTML entity in web pages, the CSS escape in content, and the escape sequence in source code.

Codes for |
Unicode code pointU+007C
HTML entity (named)&vert;
HTML decimal&#124;
HTML hex&#x7C;
CSS contentcontent: "\7C";
JavaScript"\u007C"
Python"\u007C"
Python (by name)"\N{VERTICAL LINE}"
Java / C#"\u007C"
UTF-8 bytes7C
UTF-16007C
URL encoded%7C

| vs look-alike characters

These characters look similar to | but have a different meaning and code. Pasting the wrong one can break search, sorting and screen readers.

CharNameWhen to use it
Broken Bar
U+00A6
Broken bar, an older IBM character set symbol with a visible gap in the middle.
Box Drawings Light Vertical
U+2502
Box drawings light vertical, a drawing character designed to connect seamlessly with other lines.
Double Vertical Line
U+2016
Double vertical line, used in mathematics to denote vector norms or parallel lines.
L
U+006C
Lowercase letter L, which can appear indistinguishable from | in some sans-serif typefaces.

Symbols similar to |

Click to copy, or open a symbol for its codes. See the full line symbols collection.

  • Horizontal Bar Details
  • Em Dash Details
  • En Dash Details
  • Figure Dash Details

| character properties

Official Unicode name
VERTICAL LINE
Also known as
pipe symbol, pipe character, vertical line, sheffer stroke, absolute value bar
Code point
U+007C
Unicode block
Basic Latin (U+0000–U+007F)
General category
Math symbol (Sm)
Added in
Unicode 1.1 (1993)
Plane
Basic Multilingual Plane (0)
Emoji
No, it is a text symbol

Frequently asked questions

Where is the vertical bar located on the keyboard?

On standard US keyboards, the vertical bar | is located directly above the Enter key on the backslash key, typed with Shift + \. On UK keyboards, it is positioned next to the left Shift key or typed with AltGr.

What is the difference between | and ¦ (the broken bar)?

The broken bar ¦ (U+00A6) was introduced in IBM terminal character sets to visually distinguish the display from the solid vertical bar |. In modern programming, the solid vertical bar | is always required.

How does the pipe work in command-line terminals?

The pipe | connects the standard output (stdout) of the command on the left to the standard input (stdin) of the command on the right, allowing data to flow through a processing pipeline without creating temporary files.

What is the alt code for the vertical bar (pipe)?

On Windows, hold Alt and type 124 on the numeric keypad to get |. On a laptop without a keypad, copy it from this page or use 007C then Alt + X in Word.

How do I type the vertical bar (pipe) on a Mac?

There is no single Option shortcut for | on the US layout. Press Control + Command + Space to open the Character Viewer, search for “vertical bar” and double-click it, or copy it from this page.

What is the HTML code for the vertical bar (pipe)?

Use the named entity | or the numeric reference | (hex |). All three display | in every browser.

What is the Unicode for the vertical bar (pipe)?

| is U+007C, officially named VERTICAL LINE, in the Basic Latin block. It has been part of Unicode since version 1.1 (1993).