Javatpoint Logo
Javatpoint Logo

What is a Tilde?

What is a Tilde

The tilde (), often known as the squiggly or twiddle, is a character in the ASCII character set that is used in both writing and programming. It is located underneath the Esc key on most keyboards (escape key). It happens to be ASCII code 126, which is also used in a wide range of IT-related applications, such as URL addresses, file systems, mathematics, directories, programming, etc. The given image shows how the tilde character may look when typed.

Representing the current user's home directory is another use of the tilde symbol in some operating systems, including Unix. By tradition, the tilde is used as the first character in any user's home directory in the file system on web servers. Many times, you will see the tilde character as a part of Web addresses because on the servers, users keep business or personal web pages under their personal home directory. In mathematics, the tilde means "approximately," especially when used in duplicate.

Also, in mathematics, it is also known as the "equivalency sign. For electronic text interchange, the tilde is the most prevalent standard. It's a bitwise operator in C programming that represents a unary negation, and it's also an operator in regular expression pattern matching. The tilde character is sometimes used in operating systems to abbreviate large file names.

Where is the tilde key on the keyboard?

Below is given a picture of a computer keyboard that includes the tilde key circled with red color.

What is a Tilde

How to create the tilde (~) symbol

Creating the ~ symbol on a U.S. keyboard

You need to press Shift and ~ key together on the U.S. keyboard to create the tilde symbol, hold down the Shift, and press ~. The tilde sign is on the same key as the backquote (') at the top-left region of the keyboard, below the Esc key.

Creating the ~ symbol on a tablet or smartphone

To create a tilde symbol on the tablet or smartphone's screen, first, you need to tap the numbers button (123), then you will see the symbols button (#+=), and then you are required to tap the tilde (~) button.

What is a tilde character is used for on a computer?

There are some examples given below that describe how and when the tilde is used.

  • The tilde symbol, in languages like Portuguese and Spanish, is used to indicate alternate pronunciation of a consonant or vowel by making marking over letters like 'ã' and 'ñ'.
  • The tilde can be used as an operator in pattern matching in regular expressions.
  • In Microsoft Windows 95 and later, it's used to condense long file names. For instance, modifying the "Program Files" directory name to the "Progra~1" directory.
  • A file is deemed temporary if it starts with a tilde and a dollar sign or a tilde and a dollar sign. For example, ~$example.doc.
  • It is also used as a bitwise operator in C programming languages to represent a unary negation.
  • On a Linux computer, representing the current user's home directory is another use of it.
  • The tilde character may also be used to reach the console in applications and games like Quake.
  • Another use of tilde is to access the Tilda GTK+ terminal emulator.
  • By placing it over an = symbol, for example, ≅. That means it indicates the congruence of shapes.
  • The tilde in mathematics indicates "roughly," especially when used in pairs.
  • In addition, the double tilde can be used to express another estimate, such as "roughly equal to."

How to get a tilde above a letter

If you need to use a tilde or another accent mark above a letter on the keyboard, you can use the program's "insert special character" option or the character map to do so.

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA