Spanish Keyboard

How to type ñ on any keyboard

The fastest way depends on your device. Here are all of them, from a one-key shortcut to copy and paste.

Updated:

Tap to copy

The short answer

DeviceñÑ
Mac⌥ N, then n⌥ N, then ⇧ N
Windows with a number padAlt 164 or Alt 0241Alt 165 or Alt 0209
Windows US-International~, then n, or Right Alt N~, then ⇧ N
iPhone and AndroidHold nHold N
Chromebook / LinuxCtrl ⇧ U, f1, EnterCtrl ⇧ U, d1, Enter
Word (Windows)Ctrl ⇧ ~, then nCtrl ⇧ ~, then ⇧ N
This pagen~ (Spanish → English mode) or Alt NN~ or Alt ⇧ N

On a laptop without a number pad

This is the most common case, and the one where Alt codes don't work. You have three options:

  1. Add the United States-International keyboard (Settings › Time & language › Language & region). Then ~ followed by n gives ñ.
  2. Or add Spanish (Latin America): ñ gets its own key right of L (where the semicolon was).
  3. Or open the symbol panel with Win . and find it in the Ω tab.

Switch keyboards with Win Space.

On a Mac

Press ⌥ Option + N, let go, then type n. You can also hold the n key until the menu appears and pick ñ. If holding a key repeats it instead, press-and-hold is turned off; the Option shortcut still works.

On a phone

On iPhone (Apple keyboard) and Android (Gboard, Samsung), hold n and slide to ñ. With a Spanish keyboard added, ñ has its own key.

On a Chromebook

  1. Open Settings › Device › Keyboard and inputs › Inputs (on older versions: Settings › Advanced › Languages and inputs).
  2. Choose Add input methods and pick US International keyboard or Latin American keyboard.
  3. Switch with Ctrl ⇧ Space. With US International, ~ then n gives ñ, or Right Alt N. Only the right Alt key works for this.

Without changing anything, you can also use the Unicode code: Ctrl ⇧ U, type f1, then Enter (or Space).

On Linux

In GNOME, KDE and most desktops, Ctrl ⇧ U, f1, Enter gives ñ. If you turn on a Compose key (GNOME: Settings › Keyboard › Compose Key), Compose ~ n gives ñ too. You can also add the “Spanish” or “Spanish (Latin American)” layout under Settings › Keyboard › Input Sources.

In Word and Google Docs

For the web and code

FormatñÑ
HTMLñ or ñÑ or Ñ
UnicodeU+00F1U+00D1
CSS / JavaScript\00F1 / \u00F1\00D1 / \u00D1
URL (UTF-8)%C3%B1%C3%91

Why ñ matters

Ñ is its own letter, and leaving it out changes the word:

With ñWithout
año (year)ano (anus)
caña (cane)cana (gray hair)
peña (rock, group)pena (sorrow)
moño (bun, bow)mono (monkey)

Everyday words with ñ: España, mañana (tomorrow), niño (child), señor, compañía (company), pequeño (small), baño (bathroom), cumpleaños (birthday).

Common mistakes

Where ñ comes from

Medieval scribes saved space by writing a double n (nn) as one n with a small line on top. That line, the tilde, turned the shorthand into a letter of its own: Latin annus became año. Today ñ is the fifteenth letter of the Spanish alphabet, sits between n and o in dictionaries, and has become a symbol of the language.

When sorting, ñ comes after every n: nube, nuevo, ñandú, ñoño, obra. Many English-language programs sort it wrong; in Excel and Google Sheets, set the locale to Spanish to get the right order.

Frequently asked questions

What is the Alt code for ñ?

Alt + 164 or Alt + 0241 for ñ, and Alt + 165 or Alt + 0209 for Ñ, on the number pad with Num Lock on.

What is the ñ called?

The letter is called eñe. The wavy line is a tilde (virgulilla in Spanish).

How many letters are in the Spanish alphabet?

Twenty-seven: the 26 English letters plus ñ, which comes after n.

Sources