Type a backslash, pipe, tilde or backtick on your Mac
Quick answer
On a US keyboard, \ is on the key above Return and ` is on the key left of 1. Hold Shift on those keys for | and ~.
Why it happens
These symbols share keys with each other, so one of each pair needs Shift. Where the keys sit depends on your keyboard layout: US keyboards put them in one place, and British, European and other layouts put them somewhere else. Keyboard Viewer shows you exactly where they are on yours.
How to fix it
On a US keyboard, press the key just above Return for a backslash (\). Hold Shift and press the same key for a pipe (|).
Press the key to the left of 1 for a backtick (`). Hold Shift and press it for a tilde (~).
Different keyboard? Turn on the Input menu first. Open Keyboard settings, click Edit next to Input Sources under Text Input, and turn on Show Input menu in menu bar.
macOS 26 Tahoe Keyboard›Text Input›Edit›Show Input menu in menu bar
macOS 27 Golden Gate Keyboard›Text Input›Edit…›Show Input menu in menu bar
Click the Input menu near the top right of your screen and choose Show Keyboard Viewer. A small keyboard appears on screen, matching your layout.
Hold Shift, then Option, then both, and watch the keys change in Keyboard Viewer. Find the symbol you need and press that combination on your real keyboard.
Still not fixed?
If the keys type different symbols from the ones printed on them, your Mac may be using the wrong layout. In Input Sources, keep the layout that matches your keyboard, for example U.S. or British, and remove the others.
Keyboard›Text Input›Edit…
With a keyboard that isn't made by Apple, the key next to left Shift and the one left of 1 can come out swapped. Click Change Keyboard Type… in Keyboard settings and follow the steps.
Keyboard›Change Keyboard Type…
Need a symbol just once? Choose Show Emoji & Symbols from the Input menu, search for its name, like backslash or tilde, and double-click it.
If a key does nothing at all, even in Keyboard Viewer, try another keyboard. If the built-in keyboard has a dead key, contact Apple Support or a repair shop, because the keyboard itself may need repair.
Questions people ask
Where is the backslash key on a Mac?
On a US keyboard it's the key above Return. On other layouts, open Keyboard Viewer from the Input menu to see where it is.
How do I type a tilde on a Mac?
On a US keyboard, hold Shift and press the key left of 1. On other layouts, check Keyboard Viewer while holding Shift or Option.
How do I type the pipe symbol on a Mac?
On a US keyboard, hold Shift and press the backslash key above Return.
Related fixes
Glad it worked.
Sorry it didn't. Tell us what happened and we'll fix this page.
Get there in one click with PinSet.
Press ⌃ ⌥ Space and type “where is the backslash key”. PinSet shows you these steps. One of 2,400+ checked Mac fixes. Works offline.
7 fixes free · Works offline · macOS 26 and 27