Skip to content

Backslash \

The backslash (\) leans to the left, the opposite of the forward slash (/). It separates folders in Windows paths and starts escape sequences in code. On US keyboards it sits above Enter.

How to type it

Windows
Win + . (period) opens the emoji & symbol panel
Microsoft Word
005C, then Alt + X
Mac
Control + Command + Space opens the Character Viewer
Linux (GTK/IBus)
Ctrl + Shift + U, 5c, Space

Codes for developers

Code point
U+005C
HTML entity
\
CSS
content: "\005C";
JavaScript / JSON
"\u005C"
Python
"\u005C"
URL encoding
%5C
UTF-8
5C
UTF-16
005C

Look-alike characters

  • SOLIDUS
  • SET MINUS
  • REVERSE SOLIDUS OPERATOR

Backslash vs. forward slash

An easy way to remember: the top of a backslash leans back, to the left.

  • Forward slash (/): web addresses (https://example.com/page), dates (11/13/2026), fractions (1/2) and “and/or.”
  • Backslash: Windows file paths (C:\Users\Jane\Documents) and programming.

Never use a backslash in a web address. Browsers often fix it quietly, but links typed with backslashes can break in emails, apps and code. In everyday writing there is almost no use for a backslash at all; and\or is always a typo for and/or.

What a backslash does in code

  • Escape sequences: in most languages, \n is a new line, \t a tab and \" a quote inside a string. To get one backslash, type two: \\.
  • Regular expressions: \d matches a digit and \. matches a literal period.
  • LaTeX: every command starts with a backslash, such as \frac or \alpha. To print the character itself, use \textbackslash.
  • Markdown: a backslash before a symbol such as * or _ makes it literal. That is why the shrug kaomoji loses an arm in chat apps unless you add extra backslashes.
  • Windows paths in code: write C:\\Temp inside a C# or Python string, or use forward slashes, which Windows file functions also accept.

Look-alikes and a Japanese quirk

  • ∖ (set minus) is the math operator for set difference, as in A ∖ B. In LaTeX it is \setminus.
  • ⧵ (reverse solidus operator) is another math character that looks the same.

On Japanese systems that use the older Shift_JIS encoding and fonts, the backslash code displays as a yen sign, so Windows paths look like C:¥Users¥Jane. It is still the same character underneath. Korean systems have a similar quirk with the won sign ₩.

If pressing Shift with the backslash key gives you a vertical bar (|), that is expected: the pipe is the shifted character on the same key.

Frequently asked questions

Where is the backslash key on a keyboard?

On US keyboards, it is above Enter and below Backspace, on the same key as the vertical bar (|).

Which way does a backslash lean?

To the left: its top is further left than its bottom. The forward slash (/) leans right.

How do I type a backslash on a Mac?

Press the key above Return on a US keyboard. No modifier is needed.

Why does my backslash show up as ¥?

Older Japanese fonts and encodings display the backslash code as a yen sign. The underlying character is unchanged.

Unicode data: Unicode Character Database 18.0.0 (unicode.org).

More symbols

All symbols · Copy and paste symbols · Emoji search