How to type ~ on a Swiss French keyboard

⌥ Option+NthenSpace

Hold Option and press “N”. Release everything, then press Space.

This is a dead key: nothing appears on the first press, that is expected.

Not your keyboard? You are viewing: Swiss French
Hold Option and press “N”. Release everything, then press Space.escF1F2F3F4F5F6F7F8F9F10F11F12§°1+2"3*4ç5%6&7/8(9)0='?^`⌫⇥QWERTZUIOPèü¨!↩⇪ASDFGHJKLéöàä$£⇧<>YXCVBNM,;.:-_⇧fn⌃⌥⌘⌘⌥◀▲▼▶

Try it on your keyboard: the keys you press light up.

What is the tilde for?

The tilde ~ has several uses:

  • home folder in the macOS and Linux terminal: cd ~/Documents;
  • approximately: “~20 minutes” means “about 20 minutes”;
  • bitwise NOT in C, JavaScript and Python: ~x;
  • version ranges in package managers: ~1.4;
  • in Spanish and Portuguese, it is the accent on ñ, ã or õ.

Pitfalls

  • On many Mac layouts the tilde is a dead key: nothing appears on the first press, because it waits for the next letter to make ñ or õ. To get the tilde on its own, finish with Space, as the animation shows.
  • The small tilde ˜ (U+02DC) looks similar but the terminal does not understand it. If cd ~ fails after copy-pasting, check the character.
  • On this layout: ⌥ Option+NthenSpace. On French – Numerical: ⌥ Option+NthenSpace.

~ on each layout

SystemLayoutKey combination
macOS French – Numerical ⌥ Option+NthenSpace Dead key
macOS French ⌥ Option+NthenSpace Dead key
macOS Belgian ⌥ Option+NthenSpace Dead key
macOS Swiss French ⌥ Option+NthenSpace Dead key
macOS Canadian Multilingual (CSA) ⌥ Option+Ç
macOS Canadian French ⇧ Shift+`
macOS Spanish ⌥ Option+ÑthenSpace Dead key
macOS Latin American ⌥ Option+Ñ
macOS U.S. ⇧ Shift+`
macOS ABC ⇧ Shift+`
macOS U.S. International – PC ⇧ Shift+`thenSpace Dead key

Other methods

Character Viewer

Press fn + E (or Control + Command + Space) to open the Character Viewer, search for “~” by name, then double-click it to insert it.

Text replacement

In System Settings › Keyboard › Text Replacements, map a shortcut (for example “;;x”) to the character ~: it will be inserted automatically in most apps.

~ technical details

Unicode code pointU+007E
Official Unicode nameTILDE
HTML entity&#126;
CSScontent: "\7E";
JavaScript / JSON"\u007E"
UTF-8 bytes7E
URL encoding~

The official name comes from the Unicode Character Database (ICU).

Related characters

Practice on this layout

Report a mistake

The combination does not work for you? Tell us what happens (macOS version, keyboard, what appears).