In LaTeX, ~ is used for other purpose, so it need to be typed in special ways.

We have two ways:

  • In Text environemnt: \textasciitilde
  • In Formula environment: $\sim$

Note: the second one is larger than the first one.