Keyboard shortcuts

Pipe symbol keyboard shortcuts: how to type | on any layout

The vertical bar hides in a different place on every keyboard, which is why it feels missing. Here is the shortcut for your layout, the workaround when your laptop has no AltGr key, and a button that simply copies the character.

Windows, Mac, LinuxUS and German layoutsPhone and tablet

The two quick answers

1

German Mac

Hold Option and press 7.

⌥ Option+7
2

German Windows

Hold AltGr and press the key left of the Y.

AltGr+< >
3

US layout, either system

Hold Shift and press the backslash key above Return.

Shift+\

Fastest route

Copy the pipe symbol

On a borrowed machine, or a layout you have never seen before, copying beats hunting.

|

One clean vertical bar, no spaces, no formatting. It pastes into a terminal, a Markdown table or a slide title exactly as it is.

Where the key sits

The pipe symbol on a German keyboard, in two pictures

Both shortcuts use a modifier key, which is why the character is nowhere to be seen when you look for it on its own.

Mac keyboard with the Option key and the 7 key highlighted for the pipe symbol
Mac: Option + 7Hold the Option key (marked alt) next to Command, then press 7. This is the shortcut on the German Mac layout.
German Windows keyboard with the AltGr key and the angle bracket key highlighted for the pipe symbol
Windows: AltGr + < >Hold AltGr to the right of the space bar, then press the key to the left of the Y that carries < and >.

Every layout

Pipe symbol keyboard shortcuts at a glance

Find your row, use the combination, done. The last two rows work everywhere, whatever is printed on your keys.

Your setupWindowsMac
US layout (QWERTY)Shift+\the key above ReturnShift+\the key above Return
German or Austrian layout (QWERTZ)AltGr+< >key left of the Y⌥ Option+7
Laptop without an AltGr keyCtrl+Alt+< >⌥ Option+7every Mac has Option
With a numeric keypadAlt+1 2 4hold Alt, type on the numpadnot applicable
Linux, German layoutAltGr+< >use the Mac shortcut
Phone or tablet?123then=\<Gboard123then#+=iOS
Any other layoutCharacter Map: press Win and type charmapCharacter Viewer: Ctrl++Space

Alt + 124 needs a real numeric keypad. On a compact laptop the number row will not produce the character, even with Num Lock switched on.

What it is for

Six places the vertical bar earns its keystroke

It is one of the few characters that means something different in every context, and reads calmly in all of them.

ls -la | grep report

In the command line

The original job: hand the output of one command straight to the next one. The character got its nickname here.

(cat|dog|bird)

In search and regular expressions

Inside a pattern the pipe means "or". One expression, three acceptable answers.

| Name | Role |

In Markdown tables

Every column border in a Markdown table is a pipe – which is why the key matters the moment you write documentation.

a = b | c

In code

A bitwise or in most languages, a logical or when doubled (||), and a union type in several modern ones.

Berlin | Hamburg | Munich

As a separator in text

Clean, quiet and neutral between items in a title, a slide headline or a footer – it separates without adding meaning.

=A2 & " | " & B2

In spreadsheets and data files

A common delimiter when commas and semicolons already appear inside the data, and a tidy joiner inside a formula.

Names

Pipe, vertical bar or vertical line

Four names for one character, and each one tells you which room you are standing in.

PipeThe everyday name, from what it does in a command line.
Vertical barThe typographic name, and the one you will find in style guides.
VERTICAL LINEThe official Unicode name, code point U+007C.
&#124;How to write it in HTML when the raw character would break your markup.

FAQ

Questions about the pipe symbol keyboard shortcut

What is the | symbol called?

Most people call it the pipe, because that is what it does in a command line: it pipes the output of one command into the next. Its official Unicode name is VERTICAL LINE (U+007C), and you will also see it called the vertical bar, the vertical slash or, in logic and programming, simply "or".

Where is the pipe key on a German keyboard?

It is the third symbol on the key to the left of the Y, the one that also carries < and >. Hold AltGr and press that key. If your laptop has no AltGr, Ctrl + Alt and the same key does the same job.

How do I type the pipe symbol on a Mac?

On a German Mac layout it is Option (⌥ alt) + 7. On a US Mac layout it is Shift + the backslash key above Return. The Option key is the one between Control and Command.

Alt + 124 does nothing on my laptop – why?

Alt codes need a real numeric keypad, and most compact laptops do not have one. The number row will not work, even with Num Lock on. Use the layout shortcut from the table above, or copy the character from this page.

How do I insert a pipe symbol in Word or Excel?

The keyboard shortcut for your layout works in both. If you would rather click: Insert → Symbol → More Symbols, set the subset to Basic Latin and pick the vertical line. In Excel, watch out for autocorrect when the pipe is the first character in a cell.

What does the | do in a command line?

It sends the output of the command on its left into the command on its right. ls | grep report lists the files, then filters that list for the word report – two small tools doing one job together.

Is | the same as the broken bar ¦?

No. The broken bar ¦ is a separate character (U+00A6). They look similar in some fonts, but a command line, a regular expression or a Markdown table will only accept the solid pipe.

Can I just copy the pipe symbol?

Yes – that is what the copy button on this page is for. It puts a clean | on your clipboard, with no stray spaces or formatting, which is often the fastest route on a borrowed machine.

Joern Steinz, founder of SkillDay

Written by

Jörn Steinz

Founder, SkillDay · MBA

Jörn trains corporate teams across Europe in presenting, facilitation and working well with AI tools – in German and in English. Small details like this one come up in every workshop, usually while somebody is building a table on a borrowed laptop.

If a page of yours has to explain something clearly, that is the same craft: one idea, the shortest honest route to it, and a picture where a picture helps.

Trainings that make the complicated simple

Presenting, data storytelling, facilitation, time management and Microsoft 365 Copilot – in your offices across Europe or live online.

SkillDay
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.