\

How to Type a Backslash (\) on Any Keyboard

How-To Guides · 2 min read · Published October 25, 2026

Quick answer: on a US keyboard the backslash has its own key above Enter. On a UK keyboard it is on the key left of Z. On a German Windows keyboard press AltGr+ß, and on a German Mac Shift+Option+7. On any Windows PC, Alt+92 on the numeric keypad works.

Where \ is

Keyboard / layoutKeys
US (Windows and Mac)\ key above Enter
UK Windows PC\ key left of Z (next to left Shift)
German, WindowsAltGr + ß
German, MacShift + Option + 7
Any Windows PCAlt+92 (numeric keypad)

Some compact laptops move the key or make it share space with another; look for \ printed small on a key and try Fn with it. If the layout setting doesn't match the keyboard, the key types something else; switch layouts with Win+Space. Without a numeric keypad, see Alt codes not working.

Backslash vs forward slash

/ forward slash\ backslash
Leansright, like a / road signleft
Used inweb addresses, dates (25/10), "and/or", divisionWindows paths (C:\Users), escape codes (\n), LaTeX commands (\alpha)
Alt codeAlt+47Alt+92

Modern Windows also accepts / in most paths, but \ is the standard. Web addresses always use /.

Backslash in code

In most programming languages, \ starts an escape sequence: \n is a new line, \t a tab, and \\ a literal backslash. That is why Windows paths in code are often written with double backslashes ("C:\\Users"). In LaTeX, every command starts with \ (see LaTeX math symbols).

Phones

iPhone: 123 → #+=. Gboard: ?123 → =\<.

Related: pipe | (which shares the \ key), keyboard symbols and our backslash page (Unicode calls it "reverse solidus").

Frequently asked questions

Where is the backslash on a UK keyboard?

On the key to the left of Z, next to the left Shift key. On US keyboards it is above Enter.

How do I type a backslash on a German keyboard?

Press AltGr + ß on Windows. On a German Mac, press Shift + Option + 7.

What is the Alt code for backslash?

Alt+92, typed on the numeric keypad with Num Lock on.

What is the difference between \ and /?

The forward slash / is used in web addresses, dates and division. The backslash \ separates folders in Windows file paths and starts escape codes such as \n in programming.

Looking for something else? Browse 1,000+ copy-paste symbols, the full Alt Codes finder, or the emoji picker.