Skip to main content
    Tech & Gadgets

    How Do I Type the Pipe (Vertical Bar) Symbol on Any Keyboard?

    Mark Debson

    Mark Debson

    Author

    How Do I Type the Pipe (Vertical Bar) Symbol on Any Keyboard?Save

    Quick Answer

    On a US keyboard, hold Shift and press the backslash key directly above Enter to type the pipe (|). On a UK ISO keyboard, the pipe sits on the dedicated broken bar key to the left of the 1 key, or on Shift + the key between Shift and Z.

    If your keyboard does not have the symbol printed anywhere, hold Alt and type 124 on the numeric keypad on Windows, or use Ctrl + Shift + U then 007c then Enter on Linux and Chromebook.

    Why the pipe matters

    The vertical bar (|, U+007C) is one of the most used punctuation marks in technical writing. It is the logical OR operator in C, JavaScript, Python, and SQL. It separates fields in tabular data and shell commands. It is the standard separator in SEO page titles (Brand | Page Title), in social media handles, and in tracking parameters.

    Despite being everywhere in code and content, the pipe is one of the harder keys to find on an unfamiliar keyboard because layout designers move it around depending on regional space.

    The fast reference table

    • US ANSI keyboard: Shift + backslash (above Enter)
    • UK ISO keyboard: the broken bar key left of 1, or Shift + the key between Shift and Z
    • German QWERTZ: AltGr + the less than key (next to left Shift)
    • French AZERTY: AltGr + 6
    • Spanish: AltGr + 1
    • Mac US: Shift + backslash (above Return)
    • Mac UK: Option + 7, or Shift + the broken bar key
    • Windows Alt code: Alt + 124 on the numeric keypad
    • Linux or Chromebook: Ctrl + Shift + U, type 007c, press Enter

    Finding the pipe on US keyboards

    On the US ANSI layout, the pipe shares a key with the backslash. The key sits above Enter, directly under Backspace. Pressing it on its own outputs \, and holding Shift while pressing it outputs |.

    This is the same on US Windows, US Linux, and US Mac hardware. The physical position and the modifier are identical across all three.

    Finding the pipe on UK and European keyboards

    The ISO layout (used in the UK, Ireland, and most of continental Europe) is taller and narrower than the ANSI layout, which moves the pipe around.

    UK and Irish

    Look for a small key just to the left of the number 1 key at the top of the keyboard. On most modern UK keyboards this is the dedicated broken bar key (¦), and pressing it alone or with Shift outputs the pipe character. Some boards put the pipe on Shift + the key between left Shift and Z instead. Try both.

    German QWERTZ

    Hold AltGr (the right Alt key) and press the less than key (the small key between left Shift and Y on German layouts). The combination produces |.

    French AZERTY

    Press AltGr + 6. On older AZERTY hardware the combination is AltGr + the dash key. The pipe is usually printed faintly in the lower right corner of the key cap.

    Spanish

    Press AltGr + 1. On Latin American Spanish boards, the same shortcut applies.

    Finding the pipe on a Mac

    The position depends on whether you have a US or a UK Mac.

    • US Mac: Shift + the backslash key above Return.
    • UK Mac: the broken bar key sits between the left Shift and Z. Press Shift along with it for the pipe. If your Mac has a section key (§) in the top left and no broken bar, press Option + 7 instead.

    When the key does not exist

    Compact 60 percent and 65 percent mechanical keyboards sometimes drop the dedicated pipe key entirely. Three workarounds cover every situation.

    Windows Alt code

    • Turn on Num Lock.
    • Hold the left Alt key.
    • Type 124 on the numeric keypad.
    • Release Alt.

    Linux and Chromebook Unicode entry

    Press Ctrl + Shift + U, type 007c, then press Enter or Spacebar.

    Mac Character Viewer

    Press Control + Command + Spacebar, search for "vertical bar", and double click the result.

    The pipe in code and shell commands

    The vertical bar is one of the busiest characters in technical work.

    • Logical OR: a || b in C, JavaScript, Java, and similar languages. Single | is bitwise OR in the same languages.
    • Bash and PowerShell pipes: command1 | command2 sends the output of one command as the input of the next. ls | grep pattern is the canonical Unix example.
    • SQL: the || operator concatenates strings in standard SQL.
    • Regex alternation: cat|dog matches either word.
    • Markdown tables: pipes separate columns and rows.

    The pipe in SEO and tracking

    Most title tag style guides use the pipe to separate the page title from the brand. Example: "How to Type the Pipe Symbol | DMBio". The pipe creates a clear visual break and is preferred over a hyphen in branded SERPs.

    Google Analytics and many ad platforms accept the pipe as a parameter separator in URL builders, so the character is also useful for organising campaign tracking strings.

    HTML and CSS

    The pipe does not need an HTML entity; the raw character works in markup. If you do want a named alternative, the entity | renders as | (this is part of the MathML extension set). The numeric entities | and | also work.

    Troubleshooting

    Shift plus backslash gives a hash instead of a pipe

    Your active Windows layout is UK while the keycaps are US, or vice versa. Press Windows + Spacebar to cycle layouts until the result matches.

    The pipe key prints ¦ (broken bar) instead of |

    Some old terminal fonts render the pipe with a visible gap in the middle, which can look like the broken bar. Most modern apps treat both characters the same way in practice. If a script truly fails because of the difference, copy paste the solid pipe from a known good source.

    FAQs

    What is the difference between | and ¦?

    | is the solid vertical bar (U+007C). ¦ is the broken bar (U+00A6). They look similar and are often interchanged in everyday typing, but they are different Unicode characters. Code and shell commands always expect the solid bar.

    Can I add a text replacement for the pipe?

    Yes. Map a trigger like "pp" to expand into |. Useful for compact laptops where reaching Shift + backslash slows down typing.

    The takeaway

    The pipe lives on Shift + backslash on US keyboards, on a dedicated key on UK and ISO boards, and behind AltGr on continental Europe. Memorise the position on your daily keyboard and the symbol stops getting in the way of code, table writing, and SEO titles.

    My typing & keyboard picks

    Tap any card to check today's price.

    Mark Debson

    Written by

    Mark Debson

    I'm Mark Debson, the writer behind dmbio. I spend my days digging into the science behind everyday products, brands and habits, then translating what I find into clear answers you can read in about five minutes.

    Drafted with AI assistance, fully reviewed and edited before publishing. See our editorial & AI policy.

    Related reads