Skip to content
Typing Guide

Slash vs Backslash (/ vs \): Which One to Use

The forward slash (/) leans right and is the one you want for web addresses, Mac and Linux paths, fractions and “and/or.” The backslash (\) leans left and belongs almost only in Windows file paths and programming escape sequences. If you are not writing code or a Windows path, you want the forward slash.

·4 min read·Updated Nov 2026
Dark anodized 65-percent mechanical keyboard with matte-black keycaps and two glowing electric-lime modifier keys on a gray felt desk mat.
Developer-grade shortcuts for HTML entities, Linux Compose sequences, CSS escapes, and UTF-8 clean coding workflows.

Side by side

SlashBackslash
Character/\
Unicode nameSOLIDUSREVERSE SOLIDUS
CodepointU+002FU+005C
HTML entity/ or /\ or \
Windows Alt codeAlt 47Alt 92
Mac (US layout)/ key (with ?)\ key above Return (with |)
Typical useURLs, Unix/macOS paths, fractions, dates, “and/or”Windows paths, escape sequences, regex, LaTeX commands
Copy:

Names and a way to remember which is which

The forward slash goes by several names: slash, forward slash,stroke (common in British English, as in “24/7” read “twenty-four stroke seven”), oblique and virgule. Unicode's formal name is SOLIDUS. The backslash has fewer names; Unicode calls it REVERSE SOLIDUS, and almost everyone else just says backslash. Nobody needs to say “forward slash” except to rule out the backslash, which is why the phrase mostly turns up when someone is reading a URL aloud.

Mnemonic: read the character left to right, the way you read text. The forward slash rises as it moves forward, like a person leaning into a walk. The backslash leans back, like someone leaning back in a chair. Another reliable test: a web address never needs a backslash, so if it's in a URL, it's the forward one.

Where each one belongs

Forward slash (/)

  • URLs. Every web address separates its path with /, as in https://example.com/docs/page. Browsers often silently “fix” a backslash typed into the address bar, but links in emails, documents and code will break.
  • Unix, Linux and macOS paths. /Users/sam/Documents or /etc/hosts. In these systems a backslash in a path is not a separator at all.
  • Division and fractions. 7/2 in code and spreadsheets, “1/2 cup” in recipes. For typeset fractions there are dedicated characters: the fraction slash ⁄ (U+2044) and the division slash ∕ (U+2215), plus precomposed fractions like ½ — see our fractions page.
  • Alternatives and short forms. “and/or,” “he/she,” “w/o,” “24/7,” and dates like 16/11/2026 or 11/16/2026.
  • Closing tags in HTML (</p>) and comments in many languages (// note).

Backslash (\)

  • Windows paths. C:\Users\Sam\Documents and network shares like \\server\share. Most Windows APIs and PowerShell also accept forward slashes, but Explorer, Command Prompt and many older tools expect backslashes.
  • Escape sequences. In C, Java, JavaScript, Python and most other languages, \n is a newline, \t a tab and \" a literal quote. To get one literal backslash inside a string you usually type two: "C:\\Temp".
  • Regular expressions. \d for a digit, \. for a literal dot.
  • LaTeX and Markdown. LaTeX commands start with one (\frac, \alpha); in Markdown a backslash escapes formatting characters, so \* prints a literal asterisk.

The backslash has essentially no role in ordinary prose. If you see it in a sentence like “yes\no,” it should be a forward slash.

Where they are on different keyboards

LayoutSlash /Backslash \
US (Windows & Mac)Key left of right Shift (shares with ?)Key above Enter/Return (shares with |)
UK (Windows)Key left of right Shift (shares with ?)Extra key between left Shift and Z (shares with |)
German QWERTZ (Windows)Shift + 7AltGr + ß
German (Mac)Shift + 7Option + Shift + 7
French AZERTY (Windows)Shift + : (bottom row)AltGr + 8
Spanish (Windows)Shift + 7AltGr + º (key left of 1)

The UK position catches out people who learned on a US keyboard: the backslash key moves down to the bottom-left, and the key above Enter becomes # and ~. If your backslash prints # or your “@” and quote marks have swapped, Windows is probably using the wrong layout: our backslash key not working and wrong keyboard layout fixes walk through it.

Why a backslash can look like ¥ or ₩

On Japanese systems, Windows paths often appear as C:¥Users¥Sam, and on Korean systems as C:₩Users₩Sam. The character stored in the file is still the backslash, U+005C. Older Japanese and Korean national character sets put their currency sign at the byte where ASCII has the backslash, and system fonts such as MS Gothic and Meiryo kept drawing that byte as ¥ (or ₩ in Korean fonts) for compatibility. Change the font to one without that mapping and the same text shows backslashes.

This matters when you copy: a ¥ copied from such a screen is usually a backslash and works as a path separator, but a real yen sign (U+00A5) or won sign (U+20A9) typed from a currency menu is a different character and will not. On a Japanese Mac keyboard the ¥ key types the real yen sign by default; Option + ¥ gives a backslash.

How to type each one

Windows: use the keys in the table above. If a key is missing or broken, hold Alt and type 47 on the number pad for /, or 92 for \. In Word you can also type 005C then press Alt+X.

Mac: on US and UK Mac layouts both characters have their own keys. On layouts where the backslash is hidden, open the Keyboard Viewer and hold Option and Shift to find it.

iPhone: the slash is on the first symbols page (tap 123). For the backslash, tap 123, then #+=.

Android (Gboard): the slash is on the ?123 page; the backslash is on the second symbols page, =\<.

Linux: both are on the keyboard; for code-point entry use Ctrl+Shift+U then 5c and Enter in GTK apps.

Common mistakes

  • Backslashes in URLs. example.com\page may work when typed into one browser and fail everywhere else. Always use /.
  • Single backslashes in code strings. "C:\new\table" contains a newline and a tab, not folder names. Double the backslashes, use a raw string (Python r"C:\new"), or use forward slashes, which Windows accepts in most APIs.
  • Saying “backslash” when reading a URL. It's a habit in spoken English, and it sends listeners hunting for the wrong key.
  • Using / as a division sign in typeset maths. It's fine in code and plain text; in formal maths, use a fraction or ÷ — see division sign.

FAQ

Is it “forward slash” or just “slash”?

Both are correct. “Slash” on its own means /. People add “forward” to distinguish it from the backslash.

Why does Windows use backslashes for paths?

Early MS-DOS commands already used / to introduce options (as in dir /w), so when directories arrived in DOS 2.0 the backslash was chosen as the separator. Windows inherited the choice.

Can I use forward slashes in Windows paths?

Often, yes. PowerShell, most programming languages and the Windows file APIs accept C:/Users/Sam. Command Prompt built-ins and some older programs do not, so use backslashes when typing paths for people to paste.

What is the Alt code for backslash?

Hold Alt and type 92 on the numeric keypad. The forward slash is Alt 47.

Share:

HowToTypeThis Editorial Team

A small independent team that documents how to type symbols and accented letters, checked against Microsoft, Apple and Unicode documentation. Spotted a mistake? Tell us and we will fix it.

Looking for a different glyph or accent?Symbol Picker ↗

Updated Nov 2026 · How we check

View all 56 guides
Tray
Copied to clipboard!
Ready to paste anywhere