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.
The two quick answers
German Mac
Hold Option and press 7.
⌥ Option+7German Windows
Hold AltGr and press the key left of the Y.
AltGr+< >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.
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 setup | Windows | Mac |
|---|---|---|
| US layout (QWERTY) | Shift+\the key above Return | Shift+\the key above Return |
| German or Austrian layout (QWERTZ) | AltGr+< >key left of the Y | ⌥ Option+7 |
| Laptop without an AltGr key | Ctrl+Alt+< > | ⌥ Option+7every Mac has Option |
| With a numeric keypad | Alt+1 2 4hold Alt, type on the numpad | not applicable |
| Linux, German layout | AltGr+< > | use the Mac shortcut |
| Phone or tablet | ?123then=\<Gboard | 123then#+=iOS |
| Any other layout | Character Map: press Win and type charmap | Character 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 reportIn 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 | cIn code
A bitwise or in most languages, a logical or when doubled (||), and a union type in several modern ones.
Berlin | Hamburg | MunichAs 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 & " | " & B2In 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.
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.
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.
Popular: Presentation skills training · Data storytelling · Copilot workshop · Time management · Facilitation
Microsoft, Windows and Microsoft 365 are trademarks of the Microsoft group of companies. Apple, Mac and macOS are trademarks of Apple Inc. SkillDay is an independent training provider and is not affiliated with either company.