You are here

What is the difference between forward slash and backslash?

Forward Slash (/) is into existence for more than 200 years now. It is a straight line tilted forward (/) which is being used for variety of functions. Initially used to mark commas and periods, the forward slash is now widely accepted to represent date separator, fraction and divisions. In the 18th century the forward slash was termed as “oblique”.

Below are few usage of forward slash:

  • A math symbol for divide , represents fraction. (25/5)
  • With dates, the forward slash separates the month, date, and year.  (01/01/2001)
  • A file and directory separator in a Linux or network file path. (users/password/details)
  • With HTML, XML, and other markup languages the forward slash is used with closing tags. </b> </h>
  • In MS-DOS, the forward slash is used to perform a command option.
  • With regular expressions, a forward slash is used as a delimiter or separator.
  • Used to represent the URL. (

Back Slash (\) was introduced by Bob Meter  on September 18, 1961. It is a straight line titled backwards(\). With the advent on Back Slash along with forward slash they are used to represent the Boolean operators AND (/\) & OR (\/).

Below are few usage of back slash:

. Used as a escape character in programming languages like C , Perl and PHP. For example , \n in C is used to produce new line.

. It is used in Windows to separate directory in file paths. (C:\Program\Script\Nuggets)


Leave a Reply