/
Slash or divide
PrintableASCII 47 | Hex 0x2F | U+002F
Forward slash (ASCII 47) separates directory levels in Unix file paths (/usr/bin/), components in URLs (https://example.com/path), and operands in division expressions. It is also called solidus or virgule in typography. Windows uses the backslash for file paths but accepts forward slashes in most contexts. In regular expressions, the forward slash traditionally delimits patterns (/regex/) in JavaScript and Perl, though this is a language convention rather than part of regex syntax itself. In HTML, the self-closing slash (
) was required in XHTML but is optional in HTML5.
) was required in XHTML but is optional in HTML5.
ASCII Code
Decimal
47
Hexadecimal
0x2F
Octal
57
Binary
0010 1111
URL Escape
%2F
Unicode
Code Point
U+002F
Escape
\u002f
UTF-8 Hex
0x2F
UTF-8 Binary
00101111
UTF-16
0x002F
UTF-32
0x0000002F
HTML Entities
Numeric
/
Hex
/
Named
/
How to Type
Windows Alt CodeAlt + 47
HTML Entity
/
Unicode InputU+002F
Source Code Representations
C / Java
"\u002F"CSS
\002FJavaScript
"\u002F"Perl
\x{002F}Python 2
u"\u002F"Python 3
\u002FRuby
\u{002F}Frequently Asked Questions
What is ASCII code 47?
ASCII code 47 represents the Slash or divide character. In hexadecimal it is 0x2F, in binary 0010 1111, and in octal 57. It is a printable character that appears as "/" in text.
How do I type ASCII 47 on a keyboard?
On Windows, hold Alt and type 47 on the numeric keypad. On Mac, you can use the Character Viewer (Edit > Emoji & Symbols). In HTML, use the entity / or /.